Undefined behaviour in hotspot

Omair Majid omajid at redhat.com
Wed Apr 23 18:21:54 UTC 2014

Hi Volker,

* Volker Simonis <volker.simonis at gmail.com> [2014-04-23 13:47]:
> So to cut a long story short, I've identified '-fdevirtualize' as the culprit.
> '-fdevirtualize' is automatically set if we compile with -O2 but if I compile
> macroAssembler_x86.o only with '-O2 -fno-devirtualize' I get a VM which at
> least starts up and passes some smoke tests.

Aha, Andrew Haley just walked me through similar logic and the same
flag! Though I don't really understand how (either of) you jumped from
miscompiled-code to -fno-devirtualize.

> @Omair: could you please verify this. I haven't tried x86_64 until now
> so I can not say if this fix also helps there.

Confirmed. On i686, Hotspot built with this is good enough to run javac to
compile small programs. I will test x86_64 now.


PGP Key: 66484681 (http://pgp.mit.edu/)
Fingerprint = F072 555B 0A17 3957 4E95  0056 F286 F14F 6648 4681

More information about the hotspot-dev mailing list