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

Parse::Block construction using undefined behavior

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • hotspot
    • b126
    • generic
    • generic

      In opto/parse.hpp, the Parse class has a nested Block class. The only constructor for this class is not callable; it's body consists entirely of a call to ShouldNotReachHere.

      Apparently we're "constructing" Block objects by calling the init_node/init_graph member functions on pointers to *uninitialized* memory cast to Block*, which is undefined behavior.

      Maybe someone didn't understand placement new?

            thartmann Tobias Hartmann
            kbarrett Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: