[12] RFR: 8214059: Undefined behaviour in ADLC
Simon Tooke
stooke at redhat.com
Mon Nov 19 21:06:13 UTC 2018
Hello,
I tried compiling with -fsanitize=undefined, and it found some issues in
ADLC, relying on undefined behaviour.
Issue: https://bugs.openjdk.java.net/browse/JDK-8214059
Fix:
http://cr.openjdk.java.net/~sgehwolf/webrevs/stooke/JDK-8214059/01/webrev/
There are two issues: an incorrect C-style downcast (fixed by casting to
the correct class), and a reliance on undefined integer overflow
behaviour (proposed fix by using long long arithmetic and a compile-time
guard to check correct sizeof())
Thanks for your consideration,
-Simon
More information about the hotspot-compiler-dev
mailing list