Commit 5688678
committed
MDEV-37615: Clang based static analysis false postive reports on UNINIT_VAR
Clang upstream bug llvm/llvm-project#173210
shows that a "int x=x" construct will in the intermediate representation
have code to read from x. With this generated sanitizer=undefined and
static analyzers will all see the uninitialized read and write.
Because clang has a stronger implementation of following paths to
uninitialized variables, "#define UNINIT_VAR(x) x" is the which
is what our release binaries use is the ideal path for this compiler.
Clang based compilers with error during compilation if any
uninitialized behaviour is detected at compile time because of
0c80ddb.
Corrects MDEV-36542 - 6fd57f4.1 parent 4b81180 commit 5688678
1 file changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
447 | | - | |
| 447 | + | |
448 | 448 | | |
449 | 449 | | |
450 | | - | |
451 | | - | |
| 450 | + | |
452 | 451 | | |
453 | 452 | | |
454 | 453 | | |
| |||
0 commit comments