[kaffe] CVS kaffe (dalibor): Fixed crash with bad java.library.path property

Kaffe CVS cvs-commits at kaffe.org
Sun Oct 5 17:15:03 PDT 2003


PatchSet 4101 
Date: 2003/10/06 00:12:46
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Fixed crash with bad java.library.path property

when java.library.path wasn't set to include kaffe's internal libraries, it would abort
with an error message to add it's internal libraries to the LD_LIBRARY_PATH. This has
been fixed by introducing a new system property kaffe.library.path and always searching it
before java.library.path when looking for native libraries to load. Fixes debian bug report

Members: 
	ChangeLog:1.1696->1.1697 
	libraries/clib/native/System.c:1.38->1.39 
	libraries/javalib/Klasses.jar.bootstrap:1.39->1.40 
	libraries/javalib/java/lang/NativeLibrary.java:1.3->1.4 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1696 kaffe/ChangeLog:1.1697
--- kaffe/ChangeLog:1.1696	Sun Oct  5 18:25:09 2003
+++ kaffe/ChangeLog	Mon Oct  6 00:12:46 2003
@@ -1,3 +1,19 @@
+2003-10-06  Dalibor Topic <robilad at kaffe.org>
+
+	* libraries/clib/native/System.c:
+	New system property kaffe.library.path.
+	(java_lang_System_initProperties) Set java.library.path initally
+	to empty. Set kaffe.library.path to library path.
+
+	* libraries/javalib/java/lang/NativeLibrary.java:
+	(getLibraryNames) Search kaffe.library.path first, and then look
+	for native libraries in java.library.path.
+
+	* libraries/javalib/Klasses.jar.bootstrap:
+	Regenerated.
+	
+	Reported by: Ben Burton <bab at debian.org>
+	
 2003-10-05  Dalibor Topic <robilad at kaffe.org>
 
 	* libraries/javalib/java/util/Hashtable.java:
Index: kaffe/libraries/clib/native/System.c
diff -u kaffe/libraries/clib/native/System.c:1.38 kaffe/libraries/clib/native/System.c:1.39
--- kaffe/libraries/clib/native/System.c:1.38	Tue Aug  5 15:06:39 2003
+++ kaffe/libraries/clib/native/System.c	Mon Oct  6 00:12:47 2003
@@ -234,6 +234,7 @@
 	 * file.encoding.pkg	Character encoding package
 	 * kaffe.compiler	Default java compiler
 	 * sun.boot.class.path  Bootclasspath
+	 * kaffe.library.path   Search path for kaffe's native libraries
 	 *
 	 */
 
@@ -249,7 +250,8 @@
 	setProperty(p, "java.io.tmpdir", "/tmp");	/* XXX or /var/tmp?? */
 #endif
 
-	setProperty(p, "java.library.path", getLibraryPath());
+	setProperty(p, "java.library.path", "");
+	setProperty(p, "kaffe.library.path", getLibraryPath());
 
 	setProperty(p, "java.vm.specification.version",
 		  kaffe_vm_specification_version);
Index: kaffe/libraries/javalib/Klasses.jar.bootstrap
cvs rdiff: failed to read diff file header /tmp/cvstinMIN for Klasses.jar.bootstrap,v: end of file
system command returned non-zero exit status: 1: aborting




More information about the kaffe mailing list