RFR [XS] 8041658: Use of -fdevirtualize on macroAssembler_x86.o (via -O2) with gcc 4.9.0 creates broken VM
Andrew Haley
aph at redhat.com
Thu Apr 24 12:12:49 UTC 2014
On 04/24/2014 10:42 AM, Volker Simonis wrote:
> could you pleas hold on a little bit.
>
> I just found out that for x86_64 we additionally need -fno-devirtualize
> when compiling 'assembler_x86.cpp'. Without the option, the compilation of
> "Assembler::reachable(AddressLiteral adr)" is totally broken:
>
> 0x7ffff6046910 <_ZN9Assembler9reachableE14AddressLiteral>: push %rbp
> 0x7ffff6046911 <_ZN9Assembler9reachableE14AddressLiteral+1>: mov
> %rsp,%rbp
> 0x7ffff6046914: data32 data32 nopw %cs:0x0(%rax,%rax,1)
> 0x7ffff6046920 <_ZN9Assembler19is_polling_page_farEv>: mov
> 0x12d7e69(%rip),%rax
>
> As you can see it only contains two instructions before it unconditionally
> falls into 'Assembler::is_polling_page_far()'
>
> Maybe we should do some more thorough tests on both, x86 and x86_64 with
> these settings to avoid follow-up changes.
>
> What bothers me however is the fact that we now get this sever error at
> several places in the OpenJDK while it doesn't seem to affect others and I
> can not see what's special in the coding that triggers the misbehavior?
I think I might be able to. I'm debugging GCC now.
Andrew.
More information about the hotspot-dev
mailing list