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

JVM SEGV's on lduh or lw

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.3.1_07
    • 1.4.1
    • hotspot
    • 07
    • generic
    • solaris_2.6

        test case is attached
        found in 1.4.1 and 1.3.1
        Run this on a regular 1.4.1 or 1.3.1_03 and one of three things can happen:
        1. It runs (about 25% of the time).
        2. It crashes with a seggie on a lduh (the observed strcmp problem - about
        25% of the time, usually when the count is at 49152)
        3. It crashes with a seggie in a lw (a new and interesting problem - about
        50% of the time, the count could be anything)

        Sometimes it just works... c'est la vie. Sometimes it crashes with the lduh.
        This doesn't happen in the patched build. Sometimes it crashes it what looks
        like preamble code to the strcmp stuff. This looks like an optimizer problem
        and happens on both releases, with monotonous regularity.

        Run as "java -server -Xmx256M StringTest 2".


        You will need fix for bug 4701709 from esc. 538410 prior to running in order to see this bug.


        ###@###.### 2002-06-27:

        Note: When the customer says above that the problem does not occur in
              the "patched build" He is referring to a 1.3.1_hotspot_server_VM
              that I shipped
        him with bug #4701709 fixed in... See Comments section.


        ###@###.### 2002-07-09:

        Smaller test case. fails every time:

        // $JAVA_HOME/bin/java_g -server -Xbatch -Xcomp -XX:+PrintCompilation -XX:CompileOnly=.test StringTest2
        // Correctly running program will exit silently.
        // Incorrect program SEGV's and gives "implicit exception happened..." message.

        import java.util.*;

        public class StringTest2 {
          static final int LEN = 100;
          static final int LAST = LEN-1;

          static void test(String[] myArray) {
            int i;
            for (i=0; i<LAST; i++) {
              if (myArray[i].compareTo(myArray[LAST]) != 0) {
        System.out.println("D'oh!");
              }
            }
          }
          
          public static void main(String[] args) {
            String[] myArray = new String[LEN];
            String s = "foo";

            for (int j=0; j<LAST; j++) {
              if (j < LEN / 2) {
        myArray[j] = s;
              } else {
        myArray[j] = null;
              }
            }
            myArray[LAST] = s;
            
            try {
              test(myArray);
            } catch (NullPointerException e) {
            }
          }
        }

              rasbold Chuck Rasbold
              msusko Mark Susko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: