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

fp.bugs 4147 javap does GPF/Seg Fault on example w/ static final string

XMLWordPrintable

    • 1.1
    • sparc
    • solaris_2.5
    • Not verified

      From: Mike Wynn <###@###.###>
      This does not look like form output to me.


      BUG report
      in javap

      Java version 1.0
      O/S Windows NT 3.51

      I have a small test class that will ALWAYS cause an GPF
      the problem seem to be with the static final string.

      here is the java source.
      ------------------------------------------------------
      import java.io.File;

      public class javap_Test
      {
      private static final String FILE_NAME = "my_file.data";

      public static boolean
      doesMyFileExist()
      {
      return new File( FILE_NAME ).exists();
      }
      }
      -------------------------------------------------------

      and here is the o/p for the console

      -------------------------------------------------------
      cmd ?javac javap_Test.java
      cmd ?javap -c javap_Test
      Compiled from javap_Test.java
      public class javap_Test extends java.lang.Object {
          public static boolean doesMyFileExist();
          public javap_Test();

      Method boolean doesMyFileExist()
          0 new #4 <Class java.io.File>
          3 dup
          4 ldc #1 <String "cmd ?
      cmd ?
      -------------------------------------------------------
      as you see the line for byte 4 is the point the
      Exception: access violation (0xc0000005) occured.

      I have the Dr Watson trace from this exception
      and it says that snmp.exe is causing the exception
      is this javap trying to auto-mail you with a bug
      or what ?
      if any more information is required please e-mail

      ###@###.###
      Thanks.
      P.S.
      I have check the list on known bugs and requeted
      features and would like to add one of my own
      (1239318) is not a good idea if you want what has
      been sugested surely having private functions
      solve the dilema
      I like the fact that the virtual table is in place
      after the call to java.lang.Object() unlike C++
      where the virtual table in only partly resolved
      at each level of construction. I actually use the
      way init() in a base class constructor call
      a true virtual function, I hope that there are
      no plans to remove this behavour from java.
      I thought the idea of having all function virtual
      was to allow the programmer to worry about code
      design and not how things are inplemented,
      with C++ you have to remenber to use virtual
      destructor if you inherit, you have to check
      all the time to see if a function is virtual or
      not, and when it comes to Library design the
      problem is multiplied because you have to made
      sure you have the correct amount of flexibility
      in to classes. java for me has solved a lot of
      those worries.
      Mike Wynn.

            fyellinsunw Frank Yellin (Inactive)
            bhagen Benjamin Hagen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: