public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/36247] New: Segfault with -findirect-dispatch and --jni
@ 2008-05-16 15:25 william dot fink at gmail dot com
2008-05-16 18:23 ` [Bug java/36247] " tromey at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: william dot fink at gmail dot com @ 2008-05-16 15:25 UTC (permalink / raw)
To: java-prs
When compiling a simple java file with gcj the compiler output a segfault.
After several test and simplifications, it appears that the conditions of this
failure is:
- Use the -findirect-dispatch flag
- Use the --jni flag
- The class contains at last one jni method
- The class contains at last one constructor
If one this condition is unmet, the compilation succeed.
I tried compilling the .java, .class and .jar file, each time with the same
result.
Using strace the segfaulting program seems to be jc1
I have the same result with:
- gcj-4.2 (GCC) 4.2.3 (Ubuntu 4.2.3-2ubuntu6)
- gcj-4.3 (GCC) 4.3.0 [Compiled from sources]
-- Compiler output:
$ gcj-4.3 -findirect-dispatch --jni Test.java -c
Test.java: In class 'Test':
Test.java: In method 'foo()':
Test.java:0: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
-- Test case:
public class Test
{
public native void foo ();
public Test ()
{
}
}
-- strace part (with gcj 4.2 on Ubuntu)
[pid 13927] execve("/usr/lib/gcc/i486-linux-gnu/4.2.3/jc1",
["/usr/lib/gcc/i486-linux-gnu/4.2."..., "Test.class", "-fhash-synchronization",
"-fno-use-divide-subroutine", "-fuse-boehm-gc", "-fnon-call-exceptions",
"-fkeep-inline-functions", "-quiet", "-dumpbase", "Test.class",
"-mtune=generic", "-auxbase", "Test", "-g1", "-findirect-dispatch", "-fjni",
...], [/* 38 vars */]) = 0
--
Summary: Segfault with -findirect-dispatch and --jni
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: william dot fink at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36247
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/36247] Segfault with -findirect-dispatch and --jni
2008-05-16 15:25 [Bug java/36247] New: Segfault with -findirect-dispatch and --jni william dot fink at gmail dot com
@ 2008-05-16 18:23 ` tromey at gcc dot gnu dot org
2008-05-16 19:03 ` tromey at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: tromey at gcc dot gnu dot org @ 2008-05-16 18:23 UTC (permalink / raw)
To: java-prs
------- Comment #1 from tromey at gcc dot gnu dot org 2008-05-16 18:23 -------
Confirmed
--
tromey at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-05-16 18:23:52
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36247
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/36247] Segfault with -findirect-dispatch and --jni
2008-05-16 15:25 [Bug java/36247] New: Segfault with -findirect-dispatch and --jni william dot fink at gmail dot com
2008-05-16 18:23 ` [Bug java/36247] " tromey at gcc dot gnu dot org
@ 2008-05-16 19:03 ` tromey at gcc dot gnu dot org
2008-05-16 19:39 ` tromey at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: tromey at gcc dot gnu dot org @ 2008-05-16 19:03 UTC (permalink / raw)
To: java-prs
------- Comment #2 from tromey at gcc dot gnu dot org 2008-05-16 19:03 -------
in build_jni_stub, build_class_ref returns NULL because
this_classdollar is NULL.
Probably we should call cache_this_class_ref here, but that
would mean making java_add_stmt work in the jni stub case.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36247
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/36247] Segfault with -findirect-dispatch and --jni
2008-05-16 15:25 [Bug java/36247] New: Segfault with -findirect-dispatch and --jni william dot fink at gmail dot com
2008-05-16 18:23 ` [Bug java/36247] " tromey at gcc dot gnu dot org
2008-05-16 19:03 ` tromey at gcc dot gnu dot org
@ 2008-05-16 19:39 ` tromey at gcc dot gnu dot org
2008-06-14 19:48 ` tromey at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: tromey at gcc dot gnu dot org @ 2008-05-16 19:39 UTC (permalink / raw)
To: java-prs
------- Comment #3 from tromey at gcc dot gnu dot org 2008-05-16 19:39 -------
Also, note that a workaround is to put the native method after
a non-native method.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36247
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/36247] Segfault with -findirect-dispatch and --jni
2008-05-16 15:25 [Bug java/36247] New: Segfault with -findirect-dispatch and --jni william dot fink at gmail dot com
` (2 preceding siblings ...)
2008-05-16 19:39 ` tromey at gcc dot gnu dot org
@ 2008-06-14 19:48 ` tromey at gcc dot gnu dot org
2008-06-14 19:50 ` tromey at gcc dot gnu dot org
2008-06-14 19:50 ` tromey at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: tromey at gcc dot gnu dot org @ 2008-06-14 19:48 UTC (permalink / raw)
To: java-prs
------- Comment #4 from tromey at gcc dot gnu dot org 2008-06-14 19:48 -------
Subject: Bug 36247
Author: tromey
Date: Sat Jun 14 19:48:05 2008
New Revision: 136786
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=136786
Log:
PR java/36247:
* class.c (build_class_ref): Initialize this_classdollar when
Modified:
branches/gcc-4_3-branch/gcc/java/ChangeLog
branches/gcc-4_3-branch/gcc/java/class.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36247
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/36247] Segfault with -findirect-dispatch and --jni
2008-05-16 15:25 [Bug java/36247] New: Segfault with -findirect-dispatch and --jni william dot fink at gmail dot com
` (3 preceding siblings ...)
2008-06-14 19:48 ` tromey at gcc dot gnu dot org
@ 2008-06-14 19:50 ` tromey at gcc dot gnu dot org
2008-06-14 19:50 ` tromey at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: tromey at gcc dot gnu dot org @ 2008-06-14 19:50 UTC (permalink / raw)
To: java-prs
------- Comment #6 from tromey at gcc dot gnu dot org 2008-06-14 19:50 -------
Fix checked in.
--
tromey at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.3.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36247
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/36247] Segfault with -findirect-dispatch and --jni
2008-05-16 15:25 [Bug java/36247] New: Segfault with -findirect-dispatch and --jni william dot fink at gmail dot com
` (4 preceding siblings ...)
2008-06-14 19:50 ` tromey at gcc dot gnu dot org
@ 2008-06-14 19:50 ` tromey at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: tromey at gcc dot gnu dot org @ 2008-06-14 19:50 UTC (permalink / raw)
To: java-prs
------- Comment #5 from tromey at gcc dot gnu dot org 2008-06-14 19:50 -------
Subject: Bug 36247
Author: tromey
Date: Sat Jun 14 19:49:45 2008
New Revision: 136787
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=136787
Log:
PR java/36247:
* class.c (build_class_ref): Initialize this_classdollar when
Modified:
trunk/gcc/java/ChangeLog
trunk/gcc/java/class.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36247
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-06-14 19:50 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-16 15:25 [Bug java/36247] New: Segfault with -findirect-dispatch and --jni william dot fink at gmail dot com
2008-05-16 18:23 ` [Bug java/36247] " tromey at gcc dot gnu dot org
2008-05-16 19:03 ` tromey at gcc dot gnu dot org
2008-05-16 19:39 ` tromey at gcc dot gnu dot org
2008-06-14 19:48 ` tromey at gcc dot gnu dot org
2008-06-14 19:50 ` tromey at gcc dot gnu dot org
2008-06-14 19:50 ` 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).