[all-commits] [llvm/llvm-project] 484739: [Clang] Adjust pointer-overflow sanitizer for N332...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Thu Jan 9 00:23:45 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4847395c5459f9c476808f9337abdae7fbd78a23
https://github.com/llvm/llvm-project/commit/4847395c5459f9c476808f9337abdae7fbd78a23
Author: Nikita Popov <npopov at redhat.com>
Date: 2025-01-09 (Thu, 09 Jan 2025)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/docs/UndefinedBehaviorSanitizer.rst
M clang/lib/CodeGen/CGExprScalar.cpp
M clang/test/CodeGen/catch-nullptr-and-nonzero-offset-when-nullptr-is-defined.c
M clang/test/CodeGen/catch-nullptr-and-nonzero-offset.c
M clang/test/CodeGen/catch-pointer-overflow-volatile.c
M clang/test/CodeGen/catch-pointer-overflow.c
M clang/test/CodeGen/ubsan-pointer-overflow.c
M compiler-rt/test/ubsan/TestCases/Pointer/nullptr-and-nonzero-offset-constants.cpp
M compiler-rt/test/ubsan/TestCases/Pointer/nullptr-and-nonzero-offset-summary.cpp
M compiler-rt/test/ubsan/TestCases/Pointer/nullptr-and-nonzero-offset-variable.cpp
M compiler-rt/test/ubsan_minimal/TestCases/nullptr-and-nonzero-offset.c
Log Message:
-----------
[Clang] Adjust pointer-overflow sanitizer for N3322 (#120719)
N3322 makes NULL + 0 well-defined in C, matching the C++ semantics.
Adjust the pointer-overflow sanitizer to no longer report NULL + 0 as a
pointer overflow in any language mode. NULL + nonzero will of course
continue to be reported.
As N3322 is part of
https://www.open-std.org/jtc1/sc22/wg14/www/previous.html, and we never
performed any optimizations based on NULL + 0 being undefined in the
first place, I'm applying this change to all C versions.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list