| Issue |
165756
|
| Summary |
-fsanitize=nullability should trigger on uninitialized pointers
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
vitalybuka
|
https://godbolt.org/z/Mfn8f4vYb
```
#include <string.h>
#include <stdio.h>
int main() {
void* a = nullptr;
void* _Nonnull b;
void* _Nonnull c = nullptr; // Only this one is triggered
void* _Nonnull d = &c;
memset(&d, 0, sizeof(d));
fprintf(stderr, "Done");
return 0;
}
```
I can see that memset case can be hard, but uninitialized value with or without -ftrivial-auto-var-init=zero should be easy.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs