RFR (XS): 8017578 : Hotspot compilation error with latest Studio compiler
Vladimir Kozlov
vladimir.kozlov at oracle.com
Tue Jul 2 12:15:25 PDT 2013
All destructors are empty in Form class hierarchy. I think we should
remove them all and the problem will be solved.
Vladimir
On 7/2/13 7:25 AM, David Chase wrote:
> 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