-
Bug
-
Resolution: Fixed
-
P4
-
7
-
b12
-
x86
-
linux
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2209830 | 7 | Dmitriy Samersoff | P4 | Closed | Fixed | b142 |
JDK-8142479 | 6u115 | Dmitriy Samersoff | P4 | Resolved | Fixed | b01 |
Deepak Bhole reports:
When trying to build IcedTea with GCC 4.6, we encountered an error that
stems from incorrect register allocation in release_store_fence(volatile
jbyte* p, jbyte v) in orderAccess_linux_x86.inline.hpp.
Specifically, the inline assembly call trying to do an atomic 8-bit
exchange sets the output register constrain to r. The older versions GCC
(by chance) ended up assigning the l-part of one of the a/b/c/d
registers. However with 4.6, it attempts to do this with the
%*bp register. This is fine on x86_64, but on i686 the bp register
cannot be addressed in 8-bit (%bpl). This leads to a compilation
failure:
/builddir/build/BUILD/icedtea6-1.10/openjdk-ecj/hotspot/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp: Assembler messages:
/builddir/build/BUILD/icedtea6-1.10/openjdk-ecj/hotspot/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp:160: Error: bad register name `%bpl'
/builddir/build/BUILD/icedtea6-1.10/openjdk-ecj/hotspot/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp:160: Error: bad register name `%bpl'
It is possible to make it work on both 32 and 64-bit by constraining the
output register further to only be one of a/b/c/d (=q).
Though it was only that function that caused an error, I think it'd be
best to change both uses of xchgb in orderAccess_linux_x86.inline.hpp to
use =q. Here is the webrev for it:
http://cr.openjdk.java.net/~dbhole/register-allocation-fix/webrev.00/
Christian Thalinger reports:
I just stumbled over this same bug on one of our Ubuntu machines using GCC 4.5.1. What's the status of this fix?
/home/twisti/hotspot-comp/7018355/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp: Assembler messages:
/home/twisti/hotspot-comp/7018355/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp:160: Error: bad register name `%dil'
/home/twisti/hotspot-comp/7018355/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp:160: Error: bad register name `%dil'
When trying to build IcedTea with GCC 4.6, we encountered an error that
stems from incorrect register allocation in release_store_fence(volatile
jbyte* p, jbyte v) in orderAccess_linux_x86.inline.hpp.
Specifically, the inline assembly call trying to do an atomic 8-bit
exchange sets the output register constrain to r. The older versions GCC
(by chance) ended up assigning the l-part of one of the a/b/c/d
registers. However with 4.6, it attempts to do this with the
%*bp register. This is fine on x86_64, but on i686 the bp register
cannot be addressed in 8-bit (%bpl). This leads to a compilation
failure:
/builddir/build/BUILD/icedtea6-1.10/openjdk-ecj/hotspot/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp: Assembler messages:
/builddir/build/BUILD/icedtea6-1.10/openjdk-ecj/hotspot/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp:160: Error: bad register name `%bpl'
/builddir/build/BUILD/icedtea6-1.10/openjdk-ecj/hotspot/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp:160: Error: bad register name `%bpl'
It is possible to make it work on both 32 and 64-bit by constraining the
output register further to only be one of a/b/c/d (=q).
Though it was only that function that caused an error, I think it'd be
best to change both uses of xchgb in orderAccess_linux_x86.inline.hpp to
use =q. Here is the webrev for it:
http://cr.openjdk.java.net/~dbhole/register-allocation-fix/webrev.00/
Christian Thalinger reports:
I just stumbled over this same bug on one of our Ubuntu machines using GCC 4.5.1. What's the status of this fix?
/home/twisti/hotspot-comp/7018355/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp: Assembler messages:
/home/twisti/hotspot-comp/7018355/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp:160: Error: bad register name `%dil'
/home/twisti/hotspot-comp/7018355/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp:160: Error: bad register name `%dil'
- backported by
-
JDK-8142479 incorrect register allocation in release_store_fence on linux x86
-
- Resolved
-
-
JDK-2209830 incorrect register allocation in release_store_fence on linux x86
-
- Closed
-