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

REGRESSION: Jython loop crashes 1.4.0 JVM

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.4.0
    • hotspot
    • x86
    • windows_2000



      Name: rmT116609 Date: 04/23/2002


      FULL PRODUCT VERSION :
      java version "1.4.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
      Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)

      FULL OPERATING SYSTEM VERSION :
      Microsoft Windows 2000 [Version 5.00.2195]

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Jython 2.1

      A DESCRIPTION OF THE PROBLEM :
      Running the following code with Jython 2.1 causes the JVM to crash with an application error dialog. The instruction at "0x6d3318d5" referenced memory at
      "0x00000018". The memory could not be read.

      Here is the command line:
      javac Crash.java
      java -cp .;jython.jar org.python.util.jython crash.py

      Here is crash.py:
      import java, Crash

      def makeContainer(n,m):
        c=java.util.LinkedList()
        for i in range(n):
          c.add(Crash(m))
        return c

      def crash(it):
        while it.hasNext():
          node = it.next()
          node.data = java.lang.Object()

      if __name__=="__main__":
        n=100000
        m=222
        container=makeContainer(n,m)
        crash(container.iterator())


      Here is Crash.java:
      public class Crash {
        public Object data;
        public Crash(int n) {
          data=new byte[n];
        }
      }

      Please see the atatchments for "jython.jar"

      Varying the value of m in crash.py can make the bug disappear.

      BTW, the crash hasn't happened for me on Solaris, only Win32.

      REGRESSION. Last worked in version 1.3.1

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1.Install Jython 2.1
      2.Compile Crash.java (code is in description above)
      3.Execute crash.py with jython (code is in description above)

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      The instruction at "0x6d3318d5" referenced memory at "0x00000018". The memory
      could not be read.

      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      public class Crash {
        public Object data;
        public Crash(int n) {
          data=new byte[n];
        }
      }
      ---------- END SOURCE ----------
      (Review ID: 139440)
      ======================================================================

            never Tom Rodriguez
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: