RFR (XS): 8017578 : Hotspot compilation error with latest Studio compiler
David Chase
david.r.chase at oracle.com
Tue Jul 2 07:25:21 PDT 2013
bug:
in src/share/vm/adlc/forms.hpp, class Form needs a virtual destructor,
because it has polymorphic subtypes (that also lack virtual destructors).
fix:
make the destructor virtual
testing:
Reproduce bug with new compilers, verify that changes fixes it.
Jtreg locally (MacOSX)
compiler regression tests across platforms on JPRT.
webrev:
http://cr.openjdk.java.net/~drchase/8017578/webrev.00/
PROBLEM:
This is only the first hurdle.
After this is fixed, come errors of the form:
"/export/drchase/jdk8tl-full/hotspot/src/share/vm/oops/klass.hpp", line 452: Error: Initializing const volatile oop& requires an lvalue.
"/export/drchase/jdk8tl-full/hotspot/src/share/vm/oops/klass.hpp", line 452: Error: Formal argument o of type const volatile oop& in call to oop::oop(const volatile oop&) is being passed oop.
"/export/drchase/jdk8tl-full/hotspot/src/share/vm/runtime/handles.hpp", line 69: Error: Initializing const volatile oop& requires an lvalue.
"/export/drchase/jdk8tl-full/hotspot/src/share/vm/runtime/handles.hpp", line 69: Error: Formal argument o of type const volatile oop& in call to oop::oop(const volatile oop&) is being passed oop.
...
Compilation aborted, too many Error messages.
This is caused by:
...
#define CHECK_UNHANDLED_OOPS
...
in oopsHierarchy.hpp:
class oop {
...
oop(const volatile oop& o) { set_obj(o.obj()); }
oop(const void* p) { set_obj(p); }
and in klass.hpp:
virtual oop klass_holder() const { return class_loader(); }
or in handles.hpp:
class Handle VALUE_OBJ_CLASS_SPEC {
private:
oop* _handle;
protected:
oop obj() const { return _handle == NULL ? (oop)NULL : *_handle; }
Note that this code is all supposed to work when an oop is merely
typedef class oopDesc* oop;
Note that this is probably not a "compiler" bug anymore.
David
More information about the hotspot-compiler-dev
mailing list