`ReadOfUninitializedMemory`: Improve overall precision and recall
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
Línea de trabajo
Comienza con la consulta ReadOfUninitializedMemory y compara la implementación actual con el trabajo de la rama referenciada try-use-subobjects-lib-in-rule-11-6-2. Revisa los ejemplos de pruebas unitarias para el falso positivo y el falso negativo reportados, y determina después si la consulta mejorada aumenta la precisión y la exhaustividad, al tiempo que resuelve las decisiones restantes sobre la inicialización de campos y arrays.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Affected rules
- RULE-11-6-2
- RULE-9-1
- A8-5-0
- EXP33-C
- EXP53-CPP
Description
this query makes use of approximations that underrepresent uninitialized variables and over represent definition locations. it is in the idea of only reporting cases where results are more certain, however a potential audit version of the query could be constructed that improves the potential case detection and catch some FPs and FNs that are currently not detected.
work has been done on this effort in this branch.
this improved query has benefits of:
- reuses more existing modelling
- models allocated objects in a way that reuses more out of the box library as well
- increases cases handled that involved subobjects (both potential field analysis and also array analysis)
the current improved query needs more effort on:
- still uses some approximations around field initialization (see below comment for one such improvement/but still heurisitic)
- determination on if array subobject cases should be included or not (see below comment as well for potential adjustment to align omission more with current version of query)
Example
one FP case within the unit test that will be improved is:
int *p1 = new int;
*p1 = 0; // COMPLIANT[FALSE_POSITIVE] -- this is not found bc this is not an
// lvalue access
use(p1); // COMPLIANT[FALSE_POSITIVE] -- the pointee of p1 has been
// initialized
these cases will no longer be found with the improved version of the query
one FN case within the unit test that will be improved is:
S s1;
S s2 = {1};
auto i1 = s1.m1; // NON_COMPLIANT[FALSE_NEGATIVE] - rule currently is not
// field sensitive
this cases will be found with the improved version of the query
the examples given are run with the optional additions listed below in the comment
- Lenguaje dominante
- CodeQL
- Estrellas
- 227
- Forks
- 82
- Merge medio
- 6 d 7 h
- PR fusionados (30 d)
- 9
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de github/codeql-coding-standards
-
false positive/false negative Stardard-MISRA-C++
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
github/codeql-coding-standards#1172 ·
-
Difficulty-Low false positive/false negative false-negative Impact-Low Standard-MISRA-C
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Difficulty-Medium false positive/false negative false-positive Impact-Medium Standard-CERT-C
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
github/codeql-coding-standards#1200 ·
-
`RULE-0-0-1`: "unreachable statement" false positives due to over-pruning of the control-flow graph Abiertofalse positive/false negative
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
github/codeql-coding-standards#1190 ·
-
false positive/false negative
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
github/codeql-coding-standards#1175 ·
Todos los issues de github/codeql-coding-standards
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
use-agent-os/agent-os#3314 ·
-
Implement GitHub Issue templates Abiertodocumentation low-priority templates
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
jesseray718/openroot#87 ·
-
factory-active factory-automatic task-bug-reproduction-cannot-reproduce task-identify-harness-labels-done task-identify-issue-type-done
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
danielmiessler/LifeOS#2218 ·
-
in-progress proposal
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
uibcdf/molsyssuite#36 ·