`RULE-25-21`, others: Consider something like a library TracesToExplicit<T>
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
Inizia esaminando l’implementazione e i test per RULE-25-21 e la gestione delle operazioni atomic_*_explicit. Definisci i casi supportati di tracciamento a ritroso per assegnazioni, parametri e chiamate o ritorni di funzione, quindi determina come devono essere segnalati i percorsi non validi. Il lavoro è completato quando la libreria di tracing proposta gestisce le radici accettabili e rifiuta i valori che non possono essere tracciati fino a memory_order_seq_cst.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Affected rules
RULE-25-21- Likely others, haven't researched
Description
Rule 25-21 requires that the atomic_*_explicit operations use the memory order memory_order_seq_cst.
It would probably be overly restrictive to require an explicit inline written memory_order_seq_cst at the call site. However, it's probably too accepting to merely allow any dynamically computed value. Ideally, we can support basic indirection like variable assignment, parameter values, function calls/returns, and report cases that don't trace back to an acceptable root.
Doing this as a typical flow analysis is backwards. We can easily track flow from memory_order_seq_cst exprs to atomic_*_explicit calls, but the existence of such a flow doesn't preclude that invalid values also flow to the call. Alternatively, there are potential performance issues if we consider all exprs which are not memory_order_seq_cst to be sources in the flow analysis.
Wouldn't be terribly hard to write a library such as TracesToExplicit<T> that is a very simple global flow analysis made for this purpose, starting from sinks and doing only very obvious backwards tracking of values through function calls and variable assignments. If that doesn't track back to an acceptable value, we can report it. Ideally we can report it as a path-problem though this makes such a library more complex to implement.
- Lingua principale
- CodeQL
- Stelle
- 227
- Fork
- 82
- Merge medio
- 6g 7h
- PR unite (30g)
- 9
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di github/codeql-coding-standards
-
false positive/false negative Stardard-MISRA-C++
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
github/codeql-coding-standards#1172 ·
-
Difficulty-Low false positive/false negative false-negative Impact-Low Standard-MISRA-C
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficulty-Medium false positive/false negative false-positive Impact-Medium Standard-CERT-C
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
github/codeql-coding-standards#1200 ·
-
`RULE-0-0-1`: "unreachable statement" false positives due to over-pruning of the control-flow graph Apertafalse positive/false negative
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
github/codeql-coding-standards#1190 ·
-
false positive/false negative
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
github/codeql-coding-standards#1175 ·
Tutte le issue di github/codeql-coding-standards
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
use-agent-os/agent-os#3314 ·
-
[aw] Upgrade available Apertaagentic-workflows
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
githubnext/rig#534 ·
-
documentation low-priority templates
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
jesseray718/openroot#87 ·
-
factory-active factory-automatic task-bug-reproduction-cannot-reproduce task-identify-harness-labels-done task-identify-issue-type-done
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
ReedClanton/NixOS#41 ·