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

Loop-opts incorrectly removed a safepoint poll from a loop with an early exit

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • hs11
    • 5.0, 5.0u12
    • hotspot
    • None
    • b04
    • x86, sparc
    • linux, solaris_9, windows_xp
    • Verified

        Safepoint incorrectly removed from loop L2
           L1: loop
            L2: loop
              safepoint
              if test goto L1
              call xx
            endloop L2
          endloop L1

        See method Starve9B::Starvee in attachment.

        Instructions for running:

        /java/re/jdk/1.6.0/latest/binaries/solaris-sparc/bin/java -server Starve9B
         /java/re/jdk/1.5.0_10/latest/binaries/solaris-sparc/bin/java -server Starve9B

        Simply run the program with no arguments. Wait for about a minute. It'll
        report some meaningless information on stdout which you should ignore (residual
        code from the program's original intended task of tracking down a solaris
        scheduling issue that results in LWP starvation). Enter CTRL-c. The program
        should hang and not exit. You'll need to use kill -9 to get rid of it.
        Another simple test case will soon be found in the j2se workspace, under:

            j2se/test/sun/security/ssl/SSLEngineImpl/SSLEngineDeadlock.java

        Simply remove the Thread.yield() line in the doTask() method, and let it run in c2. Should fail after 10-70 iterations.

              rknippelsunw Ross Knippel (Inactive)
              rknippelsunw Ross Knippel (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: