-
Notifications
You must be signed in to change notification settings - Fork 68
Closed
Labels
Difficulty-HighA false positive or false negative report which is expected to take 1+ week effort to addressA false positive or false negative report which is expected to take 1+ week effort to addressImpact-Mediumfalse positive/false negativeAn issue related to observed false positives or false negatives.An issue related to observed false positives or false negatives.
Description
Affected rules
M0-1-9
RULE-2-2
Description
When intercepting a build we may see the same file be compiled multiple times in different contexts. When this happens, CodeQL effectively creates an internal "copy" of the analyzed code, specialized for each context. For dead code queries, we should only flag a line of code as dead if it is dead in all such instances.
Example
header_debug.h
void log(const char *a) {
printf("%s", a);
}
header.h
void log(const char *a) {}
file.cpp
#if DEBUG
#include 'header_debug.h
#else
#include 'header.h
#endif
int main() {
log("Hello world");
}
Metadata
Metadata
Assignees
Labels
Difficulty-HighA false positive or false negative report which is expected to take 1+ week effort to addressA false positive or false negative report which is expected to take 1+ week effort to addressImpact-Mediumfalse positive/false negativeAn issue related to observed false positives or false negatives.An issue related to observed false positives or false negatives.
Type
Projects
Status
Done