Compiler-rt part of: https://reviews.llvm.org/D33910
Details
Details
Diff Detail
Diff Detail
Event Timeline
test/ubsan/TestCases/Pointer/unsigned-index-expression.cpp | ||
---|---|---|
6 | I don't know that it matters too much in practice but it may be better to make p a valid pointer instead of casting 7 into a pointer, which is at best implementation defined behavior. |
Comment Actions
- Avoid implementation-defined behavior in the test.
- Fix the signed-ness check: to check that the sign bit is off, we need 'x >= 0'. Caught by running check-ubsan.
I don't know that it matters too much in practice but it may be better to make p a valid pointer instead of casting 7 into a pointer, which is at best implementation defined behavior.