-
Enhancement
-
Resolution: Duplicate
-
P4
-
None
https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
https://blogs.oracle.com/linux/post/improving-application-security-with-undefinedbehaviorsanitizer-ubsan-and-gcc
I found a bunch of UB issues by manually turning UndefinedBehaviorSanitizer ON in Xcode project for hotspot (only Mac targeted here, so it would be nice to find a way to run it on other platforms):
JDK-8300793 UB: Member call on address 0x00011432c7a1 with insufficient space for an object of type 'VMRegImpl'
JDK-8300798 UB: Applying non-zero offset 18446744073709551614 to null pointer
JDK-8300799 UB: Store to misaligned address 0x00012f53408c for type 'uint64_t' (aka 'unsigned long long'), which requires 8 byte
alignment
alignment
byte alignment
JDK-8300827 UB: Upcast of misaligned address 0x0000deadbeef for type 'PhaseChaitin', which requires 8 byte alignment
It would be nice if this was done for all sanitizer checks and have them reported automatically.
- duplicates
-
JDK-8298448 UndefinedBehaviorSanitizer
- Resolved
- relates to
-
JDK-8300793 UB: Member call on address 0x00011432c7a1 with insufficient space for an object of type 'VMRegImpl'
- Open
-
JDK-8300798 UB: Applying non-zero offset 18446744073709551614 to null pointer
- Open
-
JDK-8300799 UB: Store to misaligned address 0x00012f53408c for type 'uint64_t' (aka 'unsigned long long'), which requires 8 byte alignment
- Open
-
JDK-8300827 UB: Upcast of misaligned address 0x0000deadbeef for type 'PhaseChaitin', which requires 8 byte alignment
- Open
-
JDK-8300800 UB: Shift exponent 32 is too large for 32-bit type 'int'
- Resolved
-
JDK-8300821 UB: Applying non-zero offset to non-null pointer 0xfffffffffffffffe produced null pointer
- Resolved
-
JDK-8300823 UB: Compile::_phase_optimize_finished is initialized too late
- Resolved
-
JDK-8300795 UB: Load of misaligned address 0x000101015035 for type 'u2' (aka 'unsigned short'), which requires 2 byte alignment
- Closed
-
JDK-8300797 UB: Left shift of negative value -1
- Closed
-
JDK-8300801 UB: Left shift of negative value in macroAssembler_aarch64.cpp
- Closed
-
JDK-8300802 UB: Left shift of negative value -1
- Closed
-
JDK-8300820 UB: Left shift of negative value -1
- Closed
-
JDK-8300822 UB: Load of misaligned address 0x00012f53417c for type 'uint64_t' (aka 'unsigned long long'), which requires 8 byte alignment
- Closed
-
JDK-8300824 UB: Member access within misaligned address 0x000101015865 for type 'const Classfile_LVT_Element', which requires 2 byte alignment
- Closed
-
JDK-8300826 UB: Left shift of negative value -1145132374
- Closed
-
JDK-8300825 UB: Signed integer overflow: 9223372036854775807 + 3 cannot be represented in type 'long'
- Closed
-
JDK-8331298 avoid alignment checks in UBSAN enabled build
- Resolved
-
JDK-8306544 Integer arithmetic overflow in hash functions for some Type classes
- Closed