mirror of
https://github.com/github/codeql.git
synced 2025-12-23 20:26:32 +01:00
C++: Add FN caused by missing static local initialization in SSA.
This commit is contained in:
@@ -615,3 +615,16 @@ void test_flow_through_void_double_pointer(int *p) // $ ast-def=p
|
|||||||
void* q = (void*)&p;
|
void* q = (void*)&p;
|
||||||
sink(**(int**)q); // $ ir MISSING: ast
|
sink(**(int**)q); // $ ir MISSING: ast
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void use(int *);
|
||||||
|
|
||||||
|
void test_def_via_phi_read(bool b)
|
||||||
|
{
|
||||||
|
static int buffer[10]; // This is missing an initialisation in IR dataflow
|
||||||
|
if (b)
|
||||||
|
{
|
||||||
|
use(buffer);
|
||||||
|
}
|
||||||
|
intPointerSource(buffer);
|
||||||
|
sink(buffer); // $ ast MISSING: ir
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user