http://llvm.org/bugs/show_bug.cgi?id=21308
Richard Smith <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |[email protected] Resolution|--- |INVALID --- Comment #8 from Richard Smith <[email protected]> --- (In reply to comment #7) > So, your statement is that the compiler-generated code will refuse to verify > a pointer against NULL even if the developer _explicitly_ checks for this in > C code? Yes. This is exactly like checking for overflow *after* you perform signed arithmetic that overflows. You can't put the undefined behavior genie back in the bottle by checking for it after it happens. > Is this a new behavior since 3.5.0? Yes, and it was documented prominently in our release notes: http://llvm.org/releases/3.5.0/tools/clang/docs/ReleaseNotes.html#c-language-changes-in-clang You can build with -fsanitize=null to catch these bugs at runtime. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ LLVMbugs mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs
