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

C2: missing output in PrintCompilation for failed compilation

XMLWordPrintable

      I noticed this when running a micro benchmark from https://github.com/franz1981/java-puzzles

      $ java -XX:+PrintCompilation -jar target/benchmark.jar -f 0 LockCoarsening.reentrantLocal
      ...
      1151 763 ! 4 red.hat.puzzles.concurrent.LockCoarsening::reentrantLocal (36 bytes) COMPILE SKIPPED:
      ...

      The reason is missing. The code producing that string is at:
      https://github.com/openjdk/jdk/blob/f54e59835492e86b9178b2050901579707f41100/src/hotspot/share/opto/compile.cpp#L780

      The string seems to be created in the resource area, a pointer to it stored somewhere and then the pointer is dereferenced after the buffer has been reclaimed. So it seems we're lucky here that there's no crash or garbage being printed.

            epeter Emanuel Peter
            roland Roland Westrelin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: