Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8191102

Incorrect include file use in classLoader.hpp

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 11
    • 10
    • hotspot
    • b07

      In classLoader.hpp we have:

      class ClassPathEntry : public CHeapObj<mtClass> {
      ...
        ClassPathEntry* next() const { return OrderAccess::load_acquire(&_next); }
      ...
        void set_next(ClassPathEntry* next) {
          OrderAccess::release_store(&_next, next);
        }

      these are inline functions which in turn use inline functions of OrderAccess. However, classLoader.hpp only includes orderAccess.hpp while the definitions of the used functions are in orderAccess.inline.hpp. This is incorrect and may be causing problems with the latest VS2017 compiler:

      http://mail.openjdk.java.net/pipermail/hotspot-dev/2017-November/029037.html
      http://mail.openjdk.java.net/pipermail/hotspot-dev/2017-November/029043.html

      However we can't include the .inline.hpp file in a .hpp file. Some refactoring needs to done if we are to preserve the inline definitions of these methods.

            hseigel Harold Seigel (Inactive)
            dholmes David Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: