public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/29812]  New: env->klass value is not updated during the native calls
@ 2006-11-13  4:37 wfragg at gmail dot com
  2006-11-13 18:48 ` [Bug java/29812] " mtrudel at gmx dot ch
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: wfragg at gmail dot com @ 2006-11-13  4:37 UTC (permalink / raw)
  To: java-prs

Hello,

While debugging the issue with the Subclipse not working under the GCJ
(look at the message
http://svn.haxx.se/subusers/archive-2006-07/0210.shtml for example) I
found the following problem. When native method is called, the
env->klass value is always NULL. It looks like that JNIEnv is reused in
the "_Jv_GetJNIEnvNewFrame" function and the env->klass value is not
updated during the call.

For more details look at the message here:
http://gcc.gnu.org/ml/java-patches/2006-q3/msg00231.html

P.S.

Steps to reproduce behavior:

1. Install gcj-4.1.1.
2. Run Eclipse with  -vm /path/to/gij
3. Install Subclipse extension (http://subclipse.tigris.org).
4. Open Windows->Preferences dialog, then open Team->SVN tab. The
Eclipse shows error message.


-- 
           Summary: env->klass value is not updated during the native calls
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: wfragg at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29812


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug java/29812] env->klass value is not updated during the native calls
  2006-11-13  4:37 [Bug java/29812] New: env->klass value is not updated during the native calls wfragg at gmail dot com
@ 2006-11-13 18:48 ` mtrudel at gmx dot ch
  2006-11-14  4:01 ` wfragg at gmail dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: mtrudel at gmx dot ch @ 2006-11-13 18:48 UTC (permalink / raw)
  To: java-prs



------- Comment #1 from mtrudel at gmx dot ch  2006-11-13 18:48 -------
Why do you make a bugreport if there's already a fix for that?
Did no one reply to your patch or don't you have copyright assignment?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29812


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug java/29812] env->klass value is not updated during the native calls
  2006-11-13  4:37 [Bug java/29812] New: env->klass value is not updated during the native calls wfragg at gmail dot com
  2006-11-13 18:48 ` [Bug java/29812] " mtrudel at gmx dot ch
@ 2006-11-14  4:01 ` wfragg at gmail dot com
  2007-01-21 23:13 ` tromey at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: wfragg at gmail dot com @ 2006-11-14  4:01 UTC (permalink / raw)
  To: java-prs



------- Comment #2 from wfragg at gmail dot com  2006-11-14 04:01 -------
The patch mentioned in mailing list does not solves the problem (and this is
stated in one of the reply). It just demonstrates the problem.

If this problem was solved - that's fine, just close the bug. Yesterday I
realized that I've sent a problem to the mailing list few months ago, but did
not reported the bug here. So to make sure that this issue will not be lost in
burden, I've posted this report.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29812


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug java/29812] env->klass value is not updated during the native calls
  2006-11-13  4:37 [Bug java/29812] New: env->klass value is not updated during the native calls wfragg at gmail dot com
  2006-11-13 18:48 ` [Bug java/29812] " mtrudel at gmx dot ch
  2006-11-14  4:01 ` wfragg at gmail dot com
@ 2007-01-21 23:13 ` tromey at gcc dot gnu dot org
  2007-01-22 23:04 ` tromey at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-01-21 23:13 UTC (permalink / raw)
  To: java-prs



------- Comment #3 from tromey at gcc dot gnu dot org  2007-01-21 23:13 -------
Thanks for the report.  I'm sorry this got lost for so long -- Andrew
Overholt pointed out the problem again the other day...
I am testing a fix.
If you've got a short test case, that would be helpful; otherwise I
will write one.


-- 

tromey at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |tromey at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-01-21 23:13:18
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29812


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug java/29812] env->klass value is not updated during the native calls
  2006-11-13  4:37 [Bug java/29812] New: env->klass value is not updated during the native calls wfragg at gmail dot com
                   ` (2 preceding siblings ...)
  2007-01-21 23:13 ` tromey at gcc dot gnu dot org
@ 2007-01-22 23:04 ` tromey at gcc dot gnu dot org
  2007-01-22 23:20 ` tromey at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-01-22 23:04 UTC (permalink / raw)
  To: java-prs



------- Comment #4 from tromey at gcc dot gnu dot org  2007-01-22 23:04 -------
Subject: Bug 29812

Author: tromey
Date: Mon Jan 22 23:04:16 2007
New Revision: 121064

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121064
Log:
        PR java/29812:
        * testsuite/libjava.jni/pr29812.java: New file.
        * testsuite/libjava.jni/pr29812_injar.java: New file.
        * testsuite/libjava.jni/pr29812_injar.jar: New file.
        * testsuite/libjava.jni/pr29812.out: New file.
        * testsuite/libjava.jni/pr29812_injar.c: New file.
        * testsuite/libjava.jni/pr29812_injar.h: New file.
        * testsuite/libjava.jni/pr29812.jar: New file.
        * testsuite/libjava.jni/pr29812.c: New file.
        * testsuite/libjava.jni/pr29812.h: New file.
        * testsuite/libjava.jni/jni.exp (gcj_jni_get_cxxflags_invocation):
        New proc.
        (gcj_jni_invocation_test_one): Use it.
        (gcj_jni_pr29812): New proc.
        (gcj_jni_run): Use it.
        * java/lang/natRuntime.cc (_load): Push a new system frame before
        calling JNI_OnLoad.
        * include/jvm.h (_Jv_JNI_PopSystemFrame): Declare.
        (_Jv_GetJNIEnvNewFrameWithLoader): Likewise.
        * jni.cc (struct _Jv_JNI_LocalFrame) <marker>: Now unsigned char.
        <allocated_p>: Now bool.
        <loader>: New field.
        (_Jv_JNI_EnsureLocalCapacity): Updated.
        (_Jv_JNI_NewLocalRef): Likewise.
        (_Jv_JNI_NewLocalRef): Likewise.
        (_Jv_JNI_PopLocalFrame): Likewise.
        (_Jv_JNI_FindClass): Likewise.
        (_Jv_GetJNIEnvNewFrame): Likewise.
        (_Jv_JNI_AttachCurrentThread): Likewise.
        (_Jv_GetJNIEnvNewFrameWithLoader): New function.
        (_Jv_GetJNIEnvNewFrame): Use it.
        * include/jni_md.h (_CLASSPATH_JNIENV_CONTENTS): Removed 'klass'.

Added:
    trunk/libjava/testsuite/libjava.jni/pr29812.c
    trunk/libjava/testsuite/libjava.jni/pr29812.h
    trunk/libjava/testsuite/libjava.jni/pr29812.jar   (with props)
    trunk/libjava/testsuite/libjava.jni/pr29812.java
    trunk/libjava/testsuite/libjava.jni/pr29812.out
    trunk/libjava/testsuite/libjava.jni/pr29812_injar.c
    trunk/libjava/testsuite/libjava.jni/pr29812_injar.h
    trunk/libjava/testsuite/libjava.jni/pr29812_injar.jar   (with props)
    trunk/libjava/testsuite/libjava.jni/pr29812_injar.java
Modified:
    trunk/libjava/ChangeLog
    trunk/libjava/include/jni_md.h
    trunk/libjava/include/jvm.h
    trunk/libjava/java/lang/natRuntime.cc
    trunk/libjava/jni.cc
    trunk/libjava/testsuite/libjava.jni/jni.exp

Propchange: trunk/libjava/testsuite/libjava.jni/pr29812.jar
            ('svn:mime-type' added)

Propchange: trunk/libjava/testsuite/libjava.jni/pr29812_injar.jar
            ('svn:mime-type' added)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29812


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug java/29812] env->klass value is not updated during the native calls
  2006-11-13  4:37 [Bug java/29812] New: env->klass value is not updated during the native calls wfragg at gmail dot com
                   ` (3 preceding siblings ...)
  2007-01-22 23:04 ` tromey at gcc dot gnu dot org
@ 2007-01-22 23:20 ` tromey at gcc dot gnu dot org
  2007-01-22 23:33 ` tromey at gcc dot gnu dot org
  2007-01-22 23:33 ` tromey at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-01-22 23:20 UTC (permalink / raw)
  To: java-prs



------- Comment #5 from tromey at gcc dot gnu dot org  2007-01-22 23:20 -------
Subject: Bug 29812

Author: tromey
Date: Mon Jan 22 23:20:18 2007
New Revision: 121065

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121065
Log:
        PR java/29812:
        * testsuite/libjava.jni/pr29812.java: New file.
        * testsuite/libjava.jni/pr29812_injar.java: New file.
        * testsuite/libjava.jni/pr29812_injar.jar: New file.
        * testsuite/libjava.jni/pr29812.out: New file.
        * testsuite/libjava.jni/pr29812_injar.c: New file.
        * testsuite/libjava.jni/pr29812_injar.h: New file.
        * testsuite/libjava.jni/pr29812.jar: New file.
        * testsuite/libjava.jni/pr29812.c: New file.
        * testsuite/libjava.jni/pr29812.h: New file.
        * testsuite/libjava.jni/jni.exp (gcj_jni_get_cxxflags_invocation):
        New proc.
        (gcj_jni_invocation_test_one): Use it.
        (gcj_jni_pr29812): New proc.
        (gcj_jni_run): Use it.
        * java/lang/natRuntime.cc (_load): Push a new system frame before
        calling JNI_OnLoad.
        * include/jvm.h (_Jv_JNI_PopSystemFrame): Declare.
        (_Jv_GetJNIEnvNewFrameWithLoader): Likewise.
        * jni.cc (struct _Jv_JNI_LocalFrame) <marker>: Now unsigned char.
        <allocated_p>: Now bool.
        <loader>: New field.
        (_Jv_JNI_EnsureLocalCapacity): Updated.
        (_Jv_JNI_NewLocalRef): Likewise.
        (_Jv_JNI_NewLocalRef): Likewise.
        (_Jv_JNI_PopLocalFrame): Likewise.
        (_Jv_JNI_FindClass): Likewise.
        (_Jv_GetJNIEnvNewFrame): Likewise.
        (_Jv_JNI_AttachCurrentThread): Likewise.
        (_Jv_GetJNIEnvNewFrameWithLoader): New function.
        (_Jv_GetJNIEnvNewFrame): Use it.
        * include/jni_md.h (_CLASSPATH_JNIENV_CONTENTS): Removed 'klass'.

Added:
   
branches/redhat/gcc-4_1-branch-java-merge-20070117/libjava/testsuite/libjava.jni/pr29812.c
      - copied unchanged from r121064,
trunk/libjava/testsuite/libjava.jni/pr29812.c
   
branches/redhat/gcc-4_1-branch-java-merge-20070117/libjava/testsuite/libjava.jni/pr29812.h
      - copied unchanged from r121064,
trunk/libjava/testsuite/libjava.jni/pr29812.h
   
branches/redhat/gcc-4_1-branch-java-merge-20070117/libjava/testsuite/libjava.jni/pr29812.jar
      - copied unchanged from r121064,
trunk/libjava/testsuite/libjava.jni/pr29812.jar
   
branches/redhat/gcc-4_1-branch-java-merge-20070117/libjava/testsuite/libjava.jni/pr29812.java
      - copied unchanged from r121064,
trunk/libjava/testsuite/libjava.jni/pr29812.java
   
branches/redhat/gcc-4_1-branch-java-merge-20070117/libjava/testsuite/libjava.jni/pr29812.out
      - copied unchanged from r121064,
trunk/libjava/testsuite/libjava.jni/pr29812.out
   
branches/redhat/gcc-4_1-branch-java-merge-20070117/libjava/testsuite/libjava.jni/pr29812_injar.c
      - copied unchanged from r121064,
trunk/libjava/testsuite/libjava.jni/pr29812_injar.c
   
branches/redhat/gcc-4_1-branch-java-merge-20070117/libjava/testsuite/libjava.jni/pr29812_injar.h
      - copied unchanged from r121064,
trunk/libjava/testsuite/libjava.jni/pr29812_injar.h
   
branches/redhat/gcc-4_1-branch-java-merge-20070117/libjava/testsuite/libjava.jni/pr29812_injar.jar
      - copied unchanged from r121064,
trunk/libjava/testsuite/libjava.jni/pr29812_injar.jar
   
branches/redhat/gcc-4_1-branch-java-merge-20070117/libjava/testsuite/libjava.jni/pr29812_injar.java
      - copied unchanged from r121064,
trunk/libjava/testsuite/libjava.jni/pr29812_injar.java
Modified:
    branches/redhat/gcc-4_1-branch-java-merge-20070117/libjava/ChangeLog
    branches/redhat/gcc-4_1-branch-java-merge-20070117/libjava/include/jni_md.h
    branches/redhat/gcc-4_1-branch-java-merge-20070117/libjava/include/jvm.h
   
branches/redhat/gcc-4_1-branch-java-merge-20070117/libjava/java/lang/natRuntime.cc
    branches/redhat/gcc-4_1-branch-java-merge-20070117/libjava/jni.cc
   
branches/redhat/gcc-4_1-branch-java-merge-20070117/libjava/testsuite/libjava.jni/jni.exp


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29812


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug java/29812] env->klass value is not updated during the native calls
  2006-11-13  4:37 [Bug java/29812] New: env->klass value is not updated during the native calls wfragg at gmail dot com
                   ` (4 preceding siblings ...)
  2007-01-22 23:20 ` tromey at gcc dot gnu dot org
@ 2007-01-22 23:33 ` tromey at gcc dot gnu dot org
  2007-01-22 23:33 ` tromey at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-01-22 23:33 UTC (permalink / raw)
  To: java-prs



------- Comment #7 from tromey at gcc dot gnu dot org  2007-01-22 23:33 -------
Fixed in 4.2, 4.3.


-- 

tromey at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.2.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29812


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug java/29812] env->klass value is not updated during the native calls
  2006-11-13  4:37 [Bug java/29812] New: env->klass value is not updated during the native calls wfragg at gmail dot com
                   ` (5 preceding siblings ...)
  2007-01-22 23:33 ` tromey at gcc dot gnu dot org
@ 2007-01-22 23:33 ` tromey at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-01-22 23:33 UTC (permalink / raw)
  To: java-prs



------- Comment #6 from tromey at gcc dot gnu dot org  2007-01-22 23:33 -------
Subject: Bug 29812

Author: tromey
Date: Mon Jan 22 23:33:24 2007
New Revision: 121066

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121066
Log:
        PR java/29812:
        * java/lang/natRuntime.cc (_load): Push a new system frame before
        calling JNI_OnLoad.
        * include/jvm.h (_Jv_JNI_PopSystemFrame): Declare.
        (_Jv_GetJNIEnvNewFrameWithLoader): Likewise.
        * jni.cc (struct _Jv_JNI_LocalFrame) <marker>: Now unsigned char.
        <allocated_p>: Now bool.
        <loader>: New field.
        (_Jv_JNI_EnsureLocalCapacity): Updated.
        (_Jv_JNI_NewLocalRef): Likewise.
        (_Jv_JNI_NewLocalRef): Likewise.
        (_Jv_JNI_PopLocalFrame): Likewise.
        (_Jv_JNI_FindClass): Likewise.
        (_Jv_GetJNIEnvNewFrame): Likewise.
        (_Jv_JNI_AttachCurrentThread): Likewise.
        (_Jv_GetJNIEnvNewFrameWithLoader): New function.
        (_Jv_GetJNIEnvNewFrame): Use it.
        * include/jni_md.h (_CLASSPATH_JNIENV_CONTENTS): Removed 'klass'.

Modified:
    branches/gcc-4_2-branch/libjava/ChangeLog
    branches/gcc-4_2-branch/libjava/include/jni_md.h
    branches/gcc-4_2-branch/libjava/include/jvm.h
    branches/gcc-4_2-branch/libjava/java/lang/natRuntime.cc
    branches/gcc-4_2-branch/libjava/jni.cc


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29812


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-01-22 23:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-13  4:37 [Bug java/29812] New: env->klass value is not updated during the native calls wfragg at gmail dot com
2006-11-13 18:48 ` [Bug java/29812] " mtrudel at gmx dot ch
2006-11-14  4:01 ` wfragg at gmail dot com
2007-01-21 23:13 ` tromey at gcc dot gnu dot org
2007-01-22 23:04 ` tromey at gcc dot gnu dot org
2007-01-22 23:20 ` tromey at gcc dot gnu dot org
2007-01-22 23:33 ` tromey at gcc dot gnu dot org
2007-01-22 23:33 ` tromey at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).