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

Stack corruption in native method invokation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.1.4
    • 2.6, unknown
    • vm-legacy
    • None
    • jit
    • 1.1.4
    • generic, x86
    • solaris_2.5.1, solaris_2.6, windows_nt
    • Not verified

      I recently upgraded from build 114 to build 141
      of the Java Workshop 2.0 Beta and I have noticed
      the recurrence of a problem which I reported in
      build 93 and no loger appeared in build 114. The
      last time I encountered the problem, I reported
      it directly to Lee Bieber, with whom I had
      discussed an earlier problem.

      The problem is this: static native methods no
      longer work because the call stack appears to
      be corrupted -- i.e., the parameters passed to
      the native method are corrupted upon entering
      the method. On the surface, it appears that the
      parameters are shifted -- the first passed
      parameter appears within the method in the
      second parameter. This problem only occurs when
      executing the program via Project/Run. When
      debugging the program, it works properly.
      Working from the command line, running the
      program with "java.exe" does not work whereas
      using "java.exe -debug" does.

      The last time I reported this problem, I
      provided a small test program to demonstrate
      it. If necessary, I can provide this program
      again.

      ****

      Additional e-mail:

      I've attached the same program I sent last time, along with the
      version of java.exe that I was using. Here's the output that I
      get from running the test:

      C:\example>java main
      val1: 5 val2: 10
      val1: 5 val2: 10
      val1: 16136808 val2: 5

      C:\example>java -debug main
      Agent password=3445an
      val1: 5 val2: 10
      val1: 5 val2: 10
      val1: 5 val2: 10

      ****

      Zip file with test code is attached.

      sfoster@eng 1997-08-01

            sdeversunw Steve Dever (Inactive)
            sgfoster Stephen Foster (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: