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

java.io.File* stream constructors: Null filename causes SEGV

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.2.0
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      1.2fcs
    • CPU:
      x86, sparc
    • OS:
      solaris_2.6
    • Verification:
      Not verified

      Description


      allan.jacobs@Eng 1998-10-05

      The JCK test api/java_io/FileWriter/index.html#FWConstructor2Test aborts on
      x86/Solaris 2.6/jdk-1.2fcs-L.
       
      #!/bin/ksh
      JDK=/net/mulder.eng/export/mulder3/jdk12x/intel/jdk1.2FCS_L
      JCK=/net/jde1.eng/export/jtech23/JCK-12a
      PATH=${JDK}/bin:/usr/dt/bin:/usr/bin:/bin:/usr/openwin/bin
      LD_LIBRARY_PATH=/usr/dt/lib:/usr/openwin/lib
      CLASSPATH=${JCK}/classes:${JCK}/javatest.jar
      export PATH
      export LD_LIBRARY_PATH
      export CLASSPATH
      STATUS=95
      let i=0
      while [ ${STATUS} = "95" ]; do
      java -verify javasoft.sqe.tests.api.java.io.FileWriter.FWCons2Test
      STATUS=$?
      echo ${i}': '${STATUS}
      let i=i+1
      done

      x86-sirius% uname -a
      SunOS x86-sirius 5.6 Generic i86pc i386 i86pc
      x86-sirius% ${JDK}/bin/java -fullversion
      java full version "JDK-1.2fcs-L"
      x86-sirius% X.ksh

      Test setup...
      Test setup done

      Starting Constructor2Test0001...
      Validation test for FileWriter(String,boolean)with append equal to false.
      Testing constructor with non-existing file (append = false)
      Calling constructor FileWriter(String,boolean
      Constructor successful
      Checking whether the object created is a valid instance
      File is created
      File got created and data is written onto the file
      Testing constructor with existing file (append = false)
      Calling constructor FileWriter(String,boolean
      Constructor successful
      Checking whether the object created is a valid instance
      File is created
      The original data is overWritten by the new data
      Testcase Constructor2Test0001 done

      Constructor2Test0001: Passed. OKAY
      Starting Constructor2Test0002...
      Validation test for FileWriter(String,boolean)with append equal to false.
      Testing constructor with non-existing file (append = true)
      Calling constructor FileWriter(String,boolean
      Constructor successful
      Checking whether the object created is a valid instance
      File is created
      File got created and data is written onto the file
      Testing constructor with existing file (append = true)
      Calling constructor FileWriter(String,boolean
      Constructor successful
      Checking whether the object created is a valid instance
      Append is true
      The data got appended to the file
      Testcase Constructor2Test0002 done

      Constructor2Test0002: Passed. OKAY
      Starting testcase Constructor2Test0003...
      Validation test for FileWriter(String,boolean
      Testcase passed: NullPointerException occured
      Testcase Constructor2Test0003 done

      Constructor2Test0003: Passed. OKAY
      SIGSEGV 11* segmentation violation
          si_signo [11]: SIGSEGV 11* segmentation violation
          si_errno [0]: Error 0
          si_code [1]: SEGV_MAPERR [addr: 0x9021A02]

      stackpointer=8044cdc

      Full thread dump Classic VM (JDK-1.2fcs-L, green threads):
          "Finalizer" (TID:0xdc8996e0, sys_thread_t:0x809def0, state:CW) prio=8
      at java.lang.Object.wait(Native Method)
      at java.lang.ref.ReferenceQueue.remove(Compiled Code)
      at java.lang.ref.ReferenceQueue.remove(Compiled Code)
      at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:174)
          "Reference Handler" (TID:0xdc8994b8, sys_thread_t:0x809e4d0, state:CW) prio=10
      at java.lang.Object.wait(Native Method)
      at java.lang.Object.wait(Compiled Code)
      at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:209)
          "Signal dispatcher" (TID:0xdc8994f0, sys_thread_t:0x8094188, state:CW) prio=5
          "main" (TID:0xdc8993a8, sys_thread_t:0x804de48, state:R) prio=5
      at java.lang.reflect.Method.invoke(Native Method)
      at javasoft.sqe.javatest.lib.MultiTest.run(Compiled Code)
      at javasoft.sqe.tests.api.java.io.FileWriter.FWCons2Test.main(Compiled Code)
      Monitor Cache Dump:
          <unknown key> (0xdc89d869): owner "main" (0x804de48) 1 entry
          java.lang.ref.ReferenceQueue$Lock@DC8996F0/DC8D0A20: <unowned>
      Waiting to be notified:
      "Finalizer" (0x809def0)
          java.lang.ref.Reference$Lock@DC8994C8/DC8D04C0: <unowned>
      Waiting to be notified:
      "Reference Handler" (0x809e4d0)
      Registered Monitor Dump:
          PCMap lock: <unowned>
          utf8 hash table: <unowned>
          JNI pinning lock: <unowned>
          JNI global reference lock: <unowned>
          BinClass lock: <unowned>
          Class linking lock: <unowned>
          System class loader lock: <unowned>
          Code rewrite lock: <unowned>
          Heap lock: <unowned>
          Monitor cache lock: owner "main" (0x804de48) 1 entry
          Dynamic loading lock: <unowned>
          Monitor IO lock: <unowned>
          User signal monitor: <unowned>
      Waiting to be notified:
      "Signal dispatcher" (0x8094188)
          Child death monitor: <unowned>
          I/O monitor: <unowned>
          Alarm monitor: <unowned>
      Waiting to be notified:
      <unknown thread> (0x8053128)
          Thread queue lock: owner "main" (0x804de48) 1 entry
          Monitor registry: owner "main" (0x804de48) 1 entry

      SIGABRT 6* abort (generated by abort(3) routine)
          si_signo [6]: SIGABRT 6* abort (generated by abort(3) routine)
          si_errno [0]: Error 0
          si_code [0]: SI_USER [pid: 63, uid: 31274]
      stackpointer=8044cdc

      Full thread dump Classic VM (JDK-1.2fcs-L, green threads):
          "Finalizer" (TID:0xdc8996e0, sys_thread_t:0x809def0, state:CW) prio=8
      at java.lang.Object.wait(Native Method)
      at java.lang.ref.ReferenceQueue.remove(Compiled Code)
      at java.lang.ref.ReferenceQueue.remove(Compiled Code)
      at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:174)
          "Reference Handler" (TID:0xdc8994b8, sys_thread_t:0x809e4d0, state:CW) prio=10
      at java.lang.Object.wait(Native Method)
      at java.lang.Object.wait(Compiled Code)
      at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:209)
          "Signal dispatcher" (TID:0xdc8994f0, sys_thread_t:0x8094188, state:CW) prio=5
          "main" (TID:0xdc8993a8, sys_thread_t:0x804de48, state:R) prio=5
      at java.lang.reflect.Method.invoke(Native Method)
      at javasoft.sqe.javatest.lib.MultiTest.run(Compiled Code)
      at javasoft.sqe.tests.api.java.io.FileWriter.FWCons2Test.main(Compiled Code)
      Monitor Cache Dump:
          <unknown key> (0xdc89d869): owner "main" (0x804de48) 1 entry
          java.lang.ref.ReferenceQueue$Lock@DC8996F0/DC8D0A20: <unowned>
      Waiting to be notified:
      "Finalizer" (0x809def0)
          java.lang.ref.Reference$Lock@DC8994C8/DC8D04C0: <unowned>
      Waiting to be notified:
      "Reference Handler" (0x809e4d0)
      Registered Monitor Dump:
          PCMap lock: <unowned>
          utf8 hash table: <unowned>
          JNI pinning lock: <unowned>
          JNI global reference lock: <unowned>
          BinClass lock: <unowned>
          Class linking lock: <unowned>
          System class loader lock: <unowned>
          Code rewrite lock: <unowned>
          Heap lock: <unowned>
          Monitor cache lock: owner "main" (0x804de48) 1 entry
          Dynamic loading lock: <unowned>
          Monitor IO lock: <unowned>
          User signal monitor: <unowned>
      Waiting to be notified:
      "Signal dispatcher" (0x8094188)
          Child death monitor: <unowned>
          I/O monitor: <unowned>
          Alarm monitor: <unowned>
      Waiting to be notified:
      <unknown thread> (0x8053128)
          Thread queue lock: owner "main" (0x804de48) 1 entry
          Monitor registry: owner "main" (0x804de48) 1 entry

      X.ksh[13]: 63 Abort
      0: 134

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mr Mark Reinhold
                Reporter:
                ajacobssunw Allan Jacobs (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: