Add support for `tss_t` thread local objects in Objects.qll
まだ誰も着手していません。
評価
調査の方向性
Objects.qll で既存の storage-duration と ObjectIdentity のサポートを読むことから始め、次に malloc、tss_create()、tss_get() がどのようにモデル化されているかを調べます。提案されている Locatable のリファクタリングと、代替となる tss_t オブジェクト設計を比較します。完了の条件は、既存のオブジェクト処理を壊すことなく、tss_t 変数がキーを保持するオブジェクトとスレッドローカルなオブジェクト ID の両方を公開することです。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- CodeQL
- スター
- 227
- フォーク
- 82
- 平均マージ
- 6日 7時間
- マージ済み PR(30日)
- 9
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/codeql-coding-standards のほかの issue
-
false positive/false negative Stardard-MISRA-C++
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
github/codeql-coding-standards#1172 ·
-
Difficulty-Low false positive/false negative false-negative Impact-Low Standard-MISRA-C
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
Difficulty-Medium false positive/false negative false-positive Impact-Medium Standard-CERT-C
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
github/codeql-coding-standards#1200 ·
-
`RULE-0-0-1`: "unreachable statement" false positives due to over-pruning of the control-flow graph オープンfalse positive/false negative
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
github/codeql-coding-standards#1190 ·
-
false positive/false negative
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
github/codeql-coding-standards#1175 ·
github/codeql-coding-standards の issue をすべて見る
似ている issue
-
sponsored
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
microsoft/navcontainerhelper#4217 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
use-agent-os/agent-os#3314 ·
-
agentic-workflows
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
githubnext/rig#534 ·
-
documentation low-priority templates
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
jesseray718/openroot#87 ·