public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/29477]  New: [MinGW] JNI broken with certain libs
@ 2006-10-15 10:47 mtrudel at gmx dot ch
  2006-10-15 10:50 ` [Bug java/29477] " mtrudel at gmx dot ch
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: mtrudel at gmx dot ch @ 2006-10-15 10:47 UTC (permalink / raw)
  To: java-prs

The patch http://gcc.gnu.org/ml/java-patches/2006-q3/msg00051.html breaks JNI
in certain cases. The application just silently dies when trying to run a
native method. Reading followup posts and patches tells me that it is known
that this might raise JNI problems.

This library doesn't work:
http://www.avetana-gmbh.de/avetana-gmbh/produkte/jsr82.eng.xml

This little snipped already failes:

public static void main(String[] args)
{
  String url = "btspp://localhost:12345678901234567890123456789012;name=TMP";
  javax.microedition.io.Connector.open(url); // application dies here
  System.out.println("worked");
}


-- 
           Summary: [MinGW] JNI broken with certain libs
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mtrudel at gmx dot ch
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-mingw32
GCC target triplet: i686-pc-mingw32


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


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

* [Bug java/29477] [MinGW] JNI broken with certain libs
  2006-10-15 10:47 [Bug java/29477] New: [MinGW] JNI broken with certain libs mtrudel at gmx dot ch
@ 2006-10-15 10:50 ` mtrudel at gmx dot ch
  2006-10-15 10:51 ` mtrudel at gmx dot ch
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: mtrudel at gmx dot ch @ 2006-10-15 10:50 UTC (permalink / raw)
  To: java-prs



------- Comment #1 from mtrudel at gmx dot ch  2006-10-15 10:50 -------
Created an attachment (id=12437)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12437&action=view)
Workaround; first patch to remove


-- 


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


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

* [Bug java/29477] [MinGW] JNI broken with certain libs
  2006-10-15 10:47 [Bug java/29477] New: [MinGW] JNI broken with certain libs mtrudel at gmx dot ch
  2006-10-15 10:50 ` [Bug java/29477] " mtrudel at gmx dot ch
@ 2006-10-15 10:51 ` mtrudel at gmx dot ch
  2006-10-15 10:51 ` mtrudel at gmx dot ch
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: mtrudel at gmx dot ch @ 2006-10-15 10:51 UTC (permalink / raw)
  To: java-prs



------- Comment #2 from mtrudel at gmx dot ch  2006-10-15 10:51 -------
Created an attachment (id=12438)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12438&action=view)
Workaround; second patch to remove


-- 


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


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

* [Bug java/29477] [MinGW] JNI broken with certain libs
  2006-10-15 10:47 [Bug java/29477] New: [MinGW] JNI broken with certain libs mtrudel at gmx dot ch
  2006-10-15 10:50 ` [Bug java/29477] " mtrudel at gmx dot ch
  2006-10-15 10:51 ` mtrudel at gmx dot ch
@ 2006-10-15 10:51 ` mtrudel at gmx dot ch
  2006-10-15 10:52 ` mtrudel at gmx dot ch
  2007-02-24  9:04 ` [Bug libgcj/29477] [SJLJ EH] " mtrudel at gmx dot ch
  4 siblings, 0 replies; 6+ messages in thread
From: mtrudel at gmx dot ch @ 2006-10-15 10:51 UTC (permalink / raw)
  To: java-prs



------- Comment #3 from mtrudel at gmx dot ch  2006-10-15 10:51 -------
Created an attachment (id=12439)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12439&action=view)
Workaround; third patch to remove


-- 


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


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

* [Bug java/29477] [MinGW] JNI broken with certain libs
  2006-10-15 10:47 [Bug java/29477] New: [MinGW] JNI broken with certain libs mtrudel at gmx dot ch
                   ` (2 preceding siblings ...)
  2006-10-15 10:51 ` mtrudel at gmx dot ch
@ 2006-10-15 10:52 ` mtrudel at gmx dot ch
  2007-02-24  9:04 ` [Bug libgcj/29477] [SJLJ EH] " mtrudel at gmx dot ch
  4 siblings, 0 replies; 6+ messages in thread
From: mtrudel at gmx dot ch @ 2006-10-15 10:52 UTC (permalink / raw)
  To: java-prs



------- Comment #4 from mtrudel at gmx dot ch  2006-10-15 10:52 -------
A workaround for the problem is reverting the three attached patches. The order
is important.


-- 


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


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

* [Bug libgcj/29477] [SJLJ EH] JNI broken with certain libs
  2006-10-15 10:47 [Bug java/29477] New: [MinGW] JNI broken with certain libs mtrudel at gmx dot ch
                   ` (3 preceding siblings ...)
  2006-10-15 10:52 ` mtrudel at gmx dot ch
@ 2007-02-24  9:04 ` mtrudel at gmx dot ch
  4 siblings, 0 replies; 6+ messages in thread
From: mtrudel at gmx dot ch @ 2007-02-24  9:04 UTC (permalink / raw)
  To: java-prs



------- Comment #5 from mtrudel at gmx dot ch  2007-02-24 09:04 -------
The problem is that the new SJLJ backtrace algorithm depends on the typical
function entry sequence "pushl %ebp; movl %esp, %ebp". But while they're always
in our compiled Java code, they are mostly optimized away in JNI libs.
Microsoft Visual C++ mostly removes them in optimization mode -Og (and -Ox
which includes -Og), GCC seems to sometimes remove them in -O2 -O3 and -Os
mode. I think -fno-omit-frame-pointer keeps them for GCC, but I didn't test it.

I think this won't be fixed and we just wait until DWARF EH is finally
available for mingw. Should be soon since it already exists but has not yet
been approved/committed.


-- 

mtrudel at gmx dot ch changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[MinGW] JNI broken with     |[SJLJ EH] JNI broken with
                   |certain libs                |certain libs


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


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

end of thread, other threads:[~2007-02-24  9:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-15 10:47 [Bug java/29477] New: [MinGW] JNI broken with certain libs mtrudel at gmx dot ch
2006-10-15 10:50 ` [Bug java/29477] " mtrudel at gmx dot ch
2006-10-15 10:51 ` mtrudel at gmx dot ch
2006-10-15 10:51 ` mtrudel at gmx dot ch
2006-10-15 10:52 ` mtrudel at gmx dot ch
2007-02-24  9:04 ` [Bug libgcj/29477] [SJLJ EH] " mtrudel at gmx dot ch

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).