This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

java/6754: Casting to gnu.gcj.RawData causes SEGV

>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
>Release:        unknown-1.0
GCJ (Linux and Win32 verified)
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).
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 {


#include "test.h"

gnu::gcj::RawData* test::foo() {
       return (gnu::gcj::RawData*)73;



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]