Request for reviews (S): 7090259: Fix hotspot sources to build with old compilers
tom.rodriguez at oracle.com
Wed Sep 14 09:54:05 PDT 2011
On Sep 14, 2011, at 9:34 AM, Vladimir Kozlov wrote:
> Yes, there was warning:
> "/opt/jprt/temp/P1/170801.amurillo/source/src/share/vm/oops/instanceRefKlass.cpp", line 355: Warning: A non-POD object of type "oop" passed as a variable argument to function "FormatBuffer<256>::FormatBuffer(const char*, ...)".
> Try SS11 compiler with your change before you push it.
More importantly, because of CHEKC_UNHANDLED_OOPS, the code wouldn't do what was intended since it was pushing an object on the stack, an oop, but the format was expecting a pointer value. The explicit cast should convert it to an actual pointer. I believe the current compilers don't complain but it's still doing the wrong thing. Should we disable CHECK_UNHANDLED_OOPS?
> Jon Masamitsu wrote:
>> Where changes like this to explicitly add the cast
>> 101 err_msg("Found an inactive reference " PTR_FORMAT " with a non-NULL discovered field",
>> 102 (oopDesc*)obj));
>> because the Solaris compilers issued a warning there?
>> I'm wondering because I was just cleaning out some casts
>> that I thought were not needed but maybe they are.
>> On 9/13/2011 4:31 PM, Vladimir Kozlov wrote:
>>> 7090259: Fix hotspot sources to build with old compilers
>>> Fixed warnings which prevent building VM with old compilers. Used non-template method_comparator() in sort_methods() since vs2003 generates incorrect optimized code for it. Added -xwe compilation flag. Tested with 5.7, 5.8 and 5.10 Sun C++.
>>> I will remove g1ErgoVerbose.hpp changes and push to hotspot-gc since Tony fixed it already there.
More information about the hotspot-dev