Unit + integration coverage for the session's work: incremental project graph/index, pcode encoder, unreachable/dead-branch, equiv/cross-TU, div-by-zero/sign-conversion/int-truncation, use-after-free, quality-precision, scan-router profile, source TU runner, detector plan, and the eval fixtures.
9 lines
231 B
C
9 lines
231 B
C
// CWE-416: use after free.
|
|
#include <stdlib.h>
|
|
__attribute__((noinline)) int vuln(void) {
|
|
int* p = (int*)malloc(sizeof(int));
|
|
*p = 7;
|
|
free(p);
|
|
return *p; // sink: use after free
|
|
}
|
|
int main(void) { return vuln(); }
|