ispeters wrote:

> Just out of curiosity, can't we detect such access uninitialized fields issue 
> by tools like asan?

Not ASAN in particular—I tried it and it actually hid the bug rather than find 
it. I think ASAN doesn't help here because the memory being read before being 
initialized is owned by a bump allocator so it's properly allocated from the 
perspective of `malloc`. Claude seems to think MSAN might help, but I don't 
have a Linux machine handy to try so I didn't test the suggestion.

https://github.com/llvm/llvm-project/pull/224677
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to