Add support for `tss_t` thread local objects in Objects.qll
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
Rechercherichtung
Beginne in Objects.qll damit, die vorhandene Unterstützung für storage-duration und ObjectIdentity zu lesen, und untersuche dann, wie malloc, tss_create() und tss_get() modelliert werden. Vergleiche das vorgeschlagene Refactoring für Locatable mit dem alternativen tss_t-Objektdesign. Als erledigt gilt die Aufgabe, wenn Variablen vom Typ tss_t sowohl das schlüsselhaltende Objekt als auch die thread-lokale Objektidentität offenlegen, ohne die bestehende Objektbehandlung zu beeinträchtigen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Objects.qll has support for identifying objects with different storage durations (static, thread local, allocated, and automatic). However, its thread local object support is limited to _Thread_local variables.
Ideally, a tss_t variable would be recognizable as two objects:
- One object representing the variable holding the tss_t key. Usually this is an object with static lifetime.
- Another object identity for the thread local behind the
tss_t.
Unfortunately, tss_t currently extends Element, which means that it can't have two implementations of the ObjectIdentity class. Alternatively, calls to tss_get() could be considered ObjectIdentitys, however, that doesn't match the intention of the ObjectIdentity class/library, as the threadlocal is really identified by the tss_t.
The threadlocal object could be identified by the tss_create call (similarly to how we identify dynamic memory via malloc calls). But it probably makes more sense to have ObjectIdentity extend Locatable and then have a tss_t variable produce two ObjectIdentys.
Otherwise the tss_t object class will closely match the malloc object class, since malloc returns a pointer to the dynamic memory just like tss_get() returns a pointer to the thread local. Additional refactoring to share code here will be required.
- Vorherrschende Sprache
- CodeQL
- Sterne
- 227
- Forks
- 82
- Ø Merge
- 6 T. 7 Std.
- Gemergte PRs (30 T.)
- 9
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus github/codeql-coding-standards
-
false positive/false negative Stardard-MISRA-C++
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
github/codeql-coding-standards#1172 ·
-
Difficulty-Low false positive/false negative false-negative Impact-Low Standard-MISRA-C
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
-
Difficulty-Medium false positive/false negative false-positive Impact-Medium Standard-CERT-C
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
github/codeql-coding-standards#1200 ·
-
`RULE-0-0-1`: "unreachable statement" false positives due to over-pruning of the control-flow graph Offenfalse positive/false negative
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
github/codeql-coding-standards#1190 ·
-
false positive/false negative
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 65/100
github/codeql-coding-standards#1175 ·
Alle Issues in github/codeql-coding-standards
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
use-agent-os/agent-os#3314 ·
-
[aw] Upgrade available Offenagentic-workflows
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
githubnext/rig#534 ·
-
documentation low-priority templates
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
jesseray718/openroot#87 ·
-
factory-active factory-automatic task-bug-reproduction-cannot-reproduce task-identify-harness-labels-done task-identify-issue-type-done
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
ReedClanton/NixOS#41 ·