Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2173041 | 7 | Xiaobin Lu | P3 | Closed | Fixed | b47 |
JDK-2180469 | 6u18 | Xiaobin Lu | P3 | Closed | Fixed | b01 |
On 32 bit Mac OS, intptr_t is typedefed as long and int32_t is typedefed as int. This is not true on other platforms such as Solaris & most of Linux distributions including BSD. In some hotspot code, we rely on the assumption that intptr_t & int32_t are same so cast from one to another automatically works. This will certainly fail on platforms which does not have that assumption.
Here is an example. In assembler_x86.hpp, we have the following definitions in class MacroAssembler:
void movptr(Address dst, intptr_t src);
void movptr(Address dst, Reigster src); (Register is defined as RegisterImpl*)
In the places we want to clear the destination address, we simply call movptr(dest, (int32_t)NULL); the cast is necessary to make the compiler to resolve the ambiguity which we believe it will pick up the intptr_t version. This will break on platforms such as Mac OS X since the cast still hasn't made it clear which one to choose.
Here is an example. In assembler_x86.hpp, we have the following definitions in class MacroAssembler:
void movptr(Address dst, intptr_t src);
void movptr(Address dst, Reigster src); (Register is defined as RegisterImpl*)
In the places we want to clear the destination address, we simply call movptr(dest, (int32_t)NULL); the cast is necessary to make the compiler to resolve the ambiguity which we believe it will pick up the intptr_t version. This will break on platforms such as Mac OS X since the cast still hasn't made it clear which one to choose.
- backported by
-
JDK-2173041 Hotspot 32 bit build fails on platforms having different definitions for intptr_t & int32_t
-
- Closed
-
-
JDK-2180469 Hotspot 32 bit build fails on platforms having different definitions for intptr_t & int32_t
-
- Closed
-
- relates to
-
JDK-6795913 A few remaining wrong casts need to be fixed for building hotspot successfully on Mac OS.
-
- Closed
-