Re: [Sablevm-developer] native libs
Brought to you by:
egagnon
From: David P. B. <db...@CS...> - 2003-01-21 14:34:35
|
Just to let you know that I have the same problem with version 1.0.5 on x86. David On Mon, Jan 20, 2003 at 04:49:30PM -0500, David Paul BELANGER wrote: >=20 > I have the same problem on both Debian/PPC and Debian/x86. However, th= e > x86 version is the older 1.0.1 version installed in the sable lab. The= PPC version is based on 1.0.5 with my PPC patch. I will try on 1.0.5 on= x86 tonight. >=20 >=20 > David >=20 > On Mon, Jan 20, 2003 at 04:21:01PM -0500, Prof. Etienne M. Gagnon wrote= : > > OK. I'm back! :-) > >=20 > > I'll look at this tomorrow. You're on Debian/x86, right? > >=20 > > Etienne > >=20 > > David Paul BELANGER wrote: > > >Hi, > > > > > >I'm getting a segmentation fault when trying to load a native librar= y. > > >The system native library (libjava-lang, libjava-io) get properly lo= aded > > >but when it comes to mine, it seems that the pointer passed to the > > >memory allocator is null. My library seems to get properly loaded (= the > > >handle is non-null). > > > > > >I have included some gdb output and a simple Hello program that caus= e > > >the error. > > > > > >Thanks, > > >David > > > > > > > > >--- > > > > > >David B=E9langer > > >Graduate Student > > >School of Computer Science > > >McGill University > > >Office: MC226 > > > > > >Web page: http://www.cs.mcgill.ca/~dbelan2/ > > >Public key: http://www.cs.mcgill.ca/~dbelan2/public_key.txt > > > > > > > > > > > >--------------------------------------------------------------------= ---- > > > > > >Program received signal SIGSEGV, Segmentation fault. > > >[Switching to Thread 1024 (LWP 10068)] > > >0x40029cbe in _svmf_cl_alloc (env=3D0x804d548, class_loader_info=3D0= x80636b8,=20 > > > size=3D12, ptr=3D0x0) at class_loader_memory_manager.c:139 > > >139 class_loader_memory_manager.c: No such file or directory. > > > in class_loader_memory_manager.c > > >(gdb) backtrace > > >#0 0x40029cbe in _svmf_cl_alloc (env=3D0x804d548,=20 > > >class_loader_info=3D0x80636b8, size=3D12, ptr=3D0x0) at=20 > > > class_loader_memory_manager.c:139 > > >#1 0x40029dd4 in _svmf_cl_zalloc (env=3D0x804d548,=20 > > >class_loader_info=3D0x80636b8, size=3D12, ptr=3D0x0) at=20 > > > class_loader_memory_manager.c:181 > > >#2 0x4002aab2 in _svmh_cl_zalloc_native_library (env=3D0x804d548,=20 > > > class_loader_info=3D0x80636b8, ptr=3D0x0) at cl_alloc.c:585 > > >#3 0x400890ea in Java_java_lang_Runtime_nativeLoad (_env=3D0x804d54= 8,=20 > > > this=3D0x8060028, _filename=3D0x8060610) at java_lang_Runtime.c:= 246 > > >#4 0x400df6ff in ffi_call_SYSV () from /usr/lib/libffi.so.2 > > >#5 0x400df41a in ffi_call () from /usr/lib/libffi.so.2 > > >#6 0x400334f8 in _svmf_invoke_native_nonstatic (env=3D0x804d548) at= =20 > > >native.c:1171 > > >#7 0x40071b53 in _svmf_interpreter (_env=3D0x804d548) > > > at instructions_switch.c:9839 > > >#8 0x40027270 in _svmh_invoke_specific_static_clinit (env=3D0x804d5= 48,=20 > > > method=3D0x4145046c) at method_invoke.c:5061 > > >#9 0x40088c9e in Java_java_lang_Class_step8 (_env=3D0x804d548,=20 > > >_class=3D0x805fd98, vmData=3D0x80607a0) at java_lang_Class.c:741 > > >#10 0x400df6ff in ffi_call_SYSV () from /usr/lib/libffi.so.2 > > >#11 0x400df41a in ffi_call () from /usr/lib/libffi.so.2 > > >#12 0x40032bf8 in _svmf_invoke_native_static (env=3D0x804d548) at=20 > > >native.c:834 > > >#13 0x40071aa4 in _svmf_interpreter (_env=3D0x804d548) > > > at instructions_switch.c:9791 > > >#14 0x4001fbaa in _svmh_invoke_nonvirtual_jlclass_initialize=20 > > >(env=3D0x804d548, this=3D0x8065b08, param_1=3D1) at method_invoke.c:= 352 > > >#15 0x4003dcaa in _svmf_class_initialization (env=3D0x804d548,=20 > > >class=3D0x41450008) > > > at initialization.c:24 > > >#16 0x4008c6d5 in Java_java_lang_VirtualMachine_invokeMain=20 > > >(_env=3D0x804d548, _class=3D0x805fda8, mainClass=3D0x805fdb8, args=3D= 0x805fdc8) > > > at java_lang_VirtualMachine.c:47 > > >#17 0x400df6ff in ffi_call_SYSV () from /usr/lib/libffi.so.2 > > >#18 0x400df41a in ffi_call () from /usr/lib/libffi.so.2 > > >#19 0x40032bf8 in _svmf_invoke_native_static (env=3D0x804d548) at=20 > > >native.c:834 > > >#20 0x40071aa4 in _svmf_interpreter (_env=3D0x804d548) > > > at instructions_switch.c:9791 > > >#21 0x40057a60 in CallStaticVoidMethod (_env=3D0x804d548, cls=3D0x80= 5f198,=20 > > > methodID=3D0x41250818) at native_interface.c:14894 > > >#22 0x0804aa4d in main (argc=3D2, argv=3D0xbffff8e4) at sablevm.c:14= 34 > > >(gdb)=20 > > > > > > > > >--------------------------------------------------------------------= ---- > > > > > > > > >public class Hello { > > > > > > static { > > > System.loadLibrary("hello"); > > > } > > > > > > private static native void printHello(); > > > > > > > > > public static void main(String[] args) { > > > printHello(); > > > } > > > > > >} > > > > > > > > >--------------------------------------------------------------------= ---- > > > > > >#include "Hello.h" > > > > > >#include <stdio.h> > > > > > >JNIEXPORT void JNICALL Java_Hello_printHello > > >(JNIEnv *env, jclass c) { > > > printf("Hello!\n"); > > >} > > > > > > > > > > > >--------------------------------------------------------------------= ---- > > > > > >/* DO NOT EDIT THIS FILE - it is machine generated */ > > >#include <jni.h> > > >/* Header for class Hello */ > > > > > >#ifndef _Included_Hello > > >#define _Included_Hello > > >#ifdef __cplusplus > > >extern "C" { > > >#endif > > >/* > > > * Class: Hello > > > * Method: printHello > > > * Signature: ()V > > > */ > > >JNIEXPORT void JNICALL Java_Hello_printHello > > > (JNIEnv *, jclass); > > > > > >#ifdef __cplusplus > > >} > > >#endif > > >#endif > > > > > > > > >--------------------------------------------------------------------= ---- > > > > > >all: > > > libtool gcc -c -g -o hello.lo -I../../../../include Hello.c > > > libtool gcc -o libhello.la -g hello.lo -rpath `pwd` > > > libtool install -c libhello.la `pwd`/libhello.la > >=20 > > --=20 > > Etienne M. Gagnon, Ph.D. http://www.info.uqam.ca/~egagnon= / > > SableVM: http://www.sablevm.org= / > > SableCC: http://www.sablecc.org= / > >=20 > >=20 > >=20 > > ------------------------------------------------------- > > This SF.NET email is sponsored by: FREE SSL Guide from Thawte > > are you planning your Web Server Security? Click here to get a FREE > > Thawte SSL guide and find the answers to all your SSL security issue= s. > > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en > > _______________________________________________ > > Sablevm-developer mailing list > > Sab...@li... > > https://lists.sourceforge.net/lists/listinfo/sablevm-developer >=20 > --=20 >=20 > --- >=20 > David B=E9langer > Graduate Student > School of Computer Science > McGill University > Office: MC226 >=20 > Web page: http://www.cs.mcgill.ca/~dbelan2/ > Public key: http://www.cs.mcgill.ca/~dbelan2/public_key.txt --=20 --- David B=E9langer Graduate Student School of Computer Science McGill University Office: MC226 Web page: http://www.cs.mcgill.ca/~dbelan2/ Public key: http://www.cs.mcgill.ca/~dbelan2/public_key.txt |