public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* java/6754: Casting to gnu.gcj.RawData causes SEGV
@ 2002-05-20 17:56 adam
0 siblings, 0 replies; 2+ messages in thread
From: adam @ 2002-05-20 17:56 UTC (permalink / raw)
To: gcc-gnats
>Number: 6754
>Category: java
>Synopsis: Casting to gnu.gcj.RawData causes SEGV
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon May 20 17:56:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: adam@xwt.org
>Release: unknown-1.0
>Organization:
>Environment:
GCJ (Linux and Win32 verified)
>Description:
Cast a gnu.gcj.RawData to Object and then back. When
casting back, the code will throw a NullPointerException --
I assume this is because the gcj-generated code is attempting
to follow the Class pointer (which RawData does not have).
>How-To-Repeat:
import java.io.*;
import gnu.gcj.RawData;
public class test {
public static native RawData foo();
public static RawData bar(Object o) {
return (RawData)o;
}
public static void main(String[] s) throws Exception {
bar(foo());
}
}
#include<gcj/cni.h>
#include<gnu/gcj/RawData.h>
#include "test.h"
gnu::gcj::RawData* test::foo() {
return (gnu::gcj::RawData*)73;
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: java/6754: Casting to gnu.gcj.RawData causes SEGV
@ 2002-05-22 20:24 bryce
0 siblings, 0 replies; 2+ messages in thread
From: bryce @ 2002-05-22 20:24 UTC (permalink / raw)
To: adam, bryce, gcc-bugs, gcc-prs, java-prs, nobody
Synopsis: Casting to gnu.gcj.RawData causes SEGV
Responsible-Changed-From-To: unassigned->bryce
Responsible-Changed-By: bryce
Responsible-Changed-When: Wed May 22 20:24:38 2002
Responsible-Changed-Why:
.
State-Changed-From-To: open->closed
State-Changed-By: bryce
State-Changed-When: Wed May 22 20:24:38 2002
State-Changed-Why:
Not a bug. It isn't possible to cast a non-Java object in Java code, even if its a RawData.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6754
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-05-23 3:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-20 17:56 java/6754: Casting to gnu.gcj.RawData causes SEGV adam
2002-05-22 20:24 bryce
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).