[kaffe] NetworkInterfaceTest fails on Linux 2.4.18-3
Hi, NetworkInterfaceTest fails when run on Linux 2.4.18-3. $ kaffe -fullversion ... Engine: Just-in-time v3 Version: 1.1.x-cvs Java Version: 1.4 Heap defaults: minimum size: 5 MB, maximum size: unlimited Stack default size: 256 KB Configuration/Compilation options: ) Compile date : Wed Aug 10 16:59:59 JST 2005 Compile host : Install prefix : /home/ito/kaffe/inst Thread system: unix-pthreads Garbage Collector: kaffe-gc CC : gcc CFLAGS : -g -O2 -Wall -pthread -DENABLE_BINRELOC LDFLAGS : ChangeLog head : 2005-08-02 Ito Kazumitsu [EMAIL PROTECTED] $ uname -a Linux 2.4.18-3 #1 Thu Apr 18 07:37:53 EDT 2002 i686 unknown $ cat test/regression/NetworkInterfaceTest.fail /home/ito/kaffe/kaffe-snap-050804/kaffe/kaffe/.libs/lt-kaffe-bin: relocation error: /home/ito/kaffe/kaffe-snap-050804/libraries/clib/net/.libs/libnet-1.1.x-cvs.so: undefined symbol: getifaddrs $ nm replace/.libs/getifaddrs.o $ Formerly, nm showed $ nm ../kaffe-snap-050630/replace/.libs/getifaddrs.o U _GLOBAL_OFFSET_TABLE_ U __errno_location U bind U calloc U close U free 0590 t free_data 0520 t free_nlmsglist 12e0 T freeifaddrs 0640 T getifaddrs U getpid 0060 t ifa_make_sockaddr t ifa_sa_len U malloc U memcpy U memset 05f0 t nl_close 00f0 t nl_getlist U realloc U recvmsg U sendto U socket U strncpy U time ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
[kaffe] kaffe security manager fix backport attemt, lock/GC bug
Hi! I made an attempt to backport the kaffe security manager fix, which is needed to run tomcat4. The patch is at http://devel.linux.hu/~mag/kaffe-tomcat-lock-gc-report/07_gnu_classloader_try10.patch There is a bug in the thing which I cannot stamp out. It bails out with kaffe-bin: /home/mag/tmp/kaffe-1.1.5/build-tree/kaffe-1.1.5/kaffe/kaffevm/locks.c:598: KaffeLock_destroyLock: Assertion `lock-lockCount == 0' failed. Log is at http://devel.linux.hu/~mag/kaffe-tomcat-lock-gc-report/catalina_2005-08-11.1.log It seems that the garbage collector throws out a living lock on the window. I attempted to figure out which object it belongs to, so made a patch enhancing lock debugging. http://devel.linux.hu/~mag/kaffe-tomcat-lock-gc-report/08_lockdebug_6.patch Unfortunately it is still not enough for me to figure out more. Could some GC guru look into the issue? I am willing to help further debugging the issue. Reproduction: - get kaffe-1.5.5-5 source from sid. - add 07_gnu_classloader_try10.patch and 08_lockdebug_6.patch to debian/patches - add --enable-debug to CONFFLAGS in debian/rules - debuild, dpkg -i kaffe-common kaffe-pthreads kaffe - apt-get install tomcat - add -vmdebug SLOWLOCKS to the beginning of CATALINA_OPTS in /etc/default/tomcat (and uncomment the line, of course - try /etc/init.d/tomcat4 start - look at the logs and cry ;( Environment: Debian sarge kernel 2.6.10 $cat /proc/cpuinfo cpu : TI UltraSparc IIe (Hummingbird) fpu : UltraSparc IIe integrated FPU promlib : Version 3 Revision 0 prom: 4.0.4 type: sun4u ncpus probed: 1 ncpus active: 1 Cpu0Bogo: 993.28 Cpu0ClkTck : 1dcd6500 MMU Type: Spitfire ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
Re: [kaffe] File order bug - Testcase
Wolfgang Baer wrote: Dalibor Topic wrote: Thanks, Wolfgang Ito. When Ito checks his patch in, I'll prepare a new tarball for debian experimental. I've received a few more warning fixes from Andreas, and want to look into the alpha kaffeh issue exposed by the experimental buildd. Hi Dalibor, thanks. BTW 1.1.5 has now successfully build on m68k (it was the remaining missing build due to package dependencies) with gcc/g++ 4.0. Thanks, Wolfgang. Could you wrap a 1.1.5-6 with the sparc FTBFS fixlet, to squash the RC bug? cheers, dalibor topic ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
[kaffe] Kaffe treats extended abstract redefinition incorrectly [Tiny Test Case attached]
Class1 is abstract, with a concrete private method 'method'. Class2 is abstract, extends Class1, with a protected abstract method 'method'. Class3 is concrete, extends Class2, with a concrete protected method 'method'. When the classes are compiled and the Main class is run under Sun's JRE 1.4.2, the following is output: In Class1 method. In Class3 method. When run under kaffe-1.1.5, the following is output: In Class1 method. java.lang.VerifyError: No code attribute for Class2.method. at Class2.init (Class2.java:8) at Class2.init (Class2.java:4) at Class2.init (Class3.java:3) at Main.main (Main.java:3) -- David Tiller Sr. Consultant CapTech Ventures, Inc Richmond, VA Class1.java Description: Class1.java Class2.java Description: Class2.java Class3.java Description: Class3.java Main.java Description: Main.java ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
[kaffe] CVS kaffe (robilad): Warning fix for Biginteger
PatchSet 6813 Date: 2005/08/11 22:07:49 Author: robilad Branch: HEAD Tag: (none) Log: Warning fix for Biginteger 2005-08-11 Andreas Tobler [EMAIL PROTECTED] * libraries/clib/math/BigInteger.c (Java_java_math_BigInteger_assignString0): Add return value to fix compiler warnings. Members: ChangeLog:1.4338-1.4339 libraries/clib/math/BigInteger.c:INITIAL-1.26 po/de.po:1.2-1.3 po/fr.po:1.17-1.18 po/kaffe.pot:1.14-1.15 po/zh_CN.po:1.4-1.5 po/zh_TW.po:1.20-1.21 Index: kaffe/ChangeLog diff -u kaffe/ChangeLog:1.4338 kaffe/ChangeLog:1.4339 --- kaffe/ChangeLog:1.4338 Thu Aug 11 01:18:40 2005 +++ kaffe/ChangeLog Thu Aug 11 22:07:49 2005 @@ -1,3 +1,9 @@ +2005-08-11 Andreas Tobler [EMAIL PROTECTED] + +* libraries/clib/math/BigInteger.c +(Java_java_math_BigInteger_assignString0): Add return value to fix +compiler warnings. + 2005-08-10 Dalibor Topic [EMAIL PROTECTED] Resynced with GNU Classpath. === Checking out kaffe/libraries/clib/math/BigInteger.c RCS: /home/cvs/kaffe/kaffe/libraries/clib/math/BigInteger.c,v VERS: 1.26 *** --- /dev/null Sun Aug 4 19:57:58 2002 +++ kaffe/libraries/clib/math/BigInteger.c Thu Aug 11 22:22:37 2005 @@ -0,0 +1,783 @@ +/* + * java.math.BigInteger.c + * + * Copyright (c) 1996, 1997, 1998 + * Transvirtual Technologies, Inc. All rights reserved. + * + * See the file license.terms for information on usage and redistribution + * of this file. + */ + +#include stdio.h + +#include config.h +#include java_math_BigInteger.h + +#if defined(HAVE_GMP_H) defined(USE_GMP) + +#include gmp.h +#include stdlib.h + +#include kaffe/jmalloc.h + +static jfieldID number; + +static void * +bi_alloc(size_t size) +{ + void *p = KMALLOC(size); + return (p); +} + +static void * +/* ARGUSED */ +bi_realloc(void *ptr, size_t UNUSED old_size, size_t new_size) +{ + void *p = KREALLOC(ptr, new_size); + return (p); +} + +static void +/* ARGUSED */ +bi_free(void *ptr, size_t UNUSED size) +{ + KFREE(ptr); +} + +void +Java_java_math_BigInteger_initialize0(JNIEnv* env, jclass cls) +{ + number = (*env)-GetFieldID(env, cls, number, kaffe.util.Ptr); + mp_set_memory_functions (bi_alloc, bi_realloc, bi_free); +} + +void +Java_java_math_BigInteger_init0(JNIEnv* env, jobject r) +{ + mpz_ptr res; + + res = (mpz_ptr)bi_alloc(sizeof(mpz_t)); + mpz_init(res); + + (*env)-SetObjectField(env, r, number, (jobject)res); +} + +void +Java_java_math_BigInteger_finalize0(JNIEnv* env, jobject r) +{ + mpz_ptr res; + + res = (*env)-GetObjectField(env, r, number); + + mpz_clear(res); + bi_free(res, sizeof(mpz_t)); +} + +void +Java_java_math_BigInteger_assignLong0(JNIEnv* env, jobject r, jlong v) +{ + mpz_ptr res; + int negative = v 0 ? -1 : 0; + + res = (*env)-GetObjectField(env, r, number); + + if (negative) + v = -v; + /* Note that v will remain negative if it's LONG_LONG_MIN. + This is not a problem because any sign copying in the right + shift will be stripped with the cast to jint, and the + number will be considered positive. Furthermore, in this + case, (jint)v will be zero, so the addition will be a + do-nothing operation. At last, the number will be made + negative, as appropriate. */ + mpz_set_ui(res, (unsigned long)(jint)(v 32)); + mpz_mul_2exp(res, res, 32); + mpz_add_ui(res, res, (unsigned long)(jint)v); + if (negative) + mpz_neg(res, res); +} + +void +Java_java_math_BigInteger_assignBytes0(JNIEnv* env, jobject r, jint sign, jbyteArray magnitude) +{ + mpz_ptr res; + jbyte* data; + int i; + int len; + + res = (*env)-GetObjectField(env, r, number); + + len = (*env)-GetArrayLength(env, magnitude); + data = (*env)-GetByteArrayElements(env, magnitude, NULL); + + /* clear mpz by setting it to zero; do not use mpz_clear here +* cause that would free its storage which is wrong. +*/ + mpz_set_ui(res, 0); + for (i = 0; i len; i++) { + mpz_mul_ui(res, res, (unsigned long)256); + mpz_add_ui(res, res, (unsigned long)(data[i] 0xFF)); + } + + (*env)-ReleaseByteArrayElements(env, magnitude, data, JNI_ABORT); + + if (sign == -1) { + mpz_neg(res, res); + } +} + +/** + * Parse a string with given radix and assign its value to a BigInteger object. + * + * @param env JNI environment + * @param r this BigInteger object + * @param val Java string value to assign + * @param radix radix of string value + * + * @return 0 if the string can be parsed and assigned. If anything fails, return -1. + */ +jint +Java_java_math_BigInteger_assignString0(JNIEnv* env,
Re: [kaffe] Kaffe treats extended abstract redefinition incorrectly [Tiny Test Case attached]
Hi, From: David Tiller [EMAIL PROTECTED] Subject: [kaffe] Kaffe treats extended abstract redefinition incorrectly [Tiny Test Case attached] Date: Thu, 11 Aug 2005 08:00:54 -0400 When run under kaffe-1.1.5, the following is output: In Class1 method. java.lang.VerifyError: No code attribute for Class2.method. at Class2.init (Class2.java:8) at Class2.init (Class2.java:4) at Class2.init (Class3.java:3) at Main.main (Main.java:3) I tried this with the current CVS version of Kaffe, and did not see this error. ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
[kaffe] CVS kaffe (robilad): Warning fixes for ppc jit
PatchSet 6814 Date: 2005/08/12 01:58:39 Author: robilad Branch: HEAD Tag: (none) Log: Warning fixes for ppc jit 2005-08-11 Andreas Tobler [EMAIL PROTECTED] * kaffe/kaffevm/jit3/funcs.h: Add HAVE_move_register_float and HAVE_move_register_double to fix compiler warnings. Members: ChangeLog:1.4339-1.4340 kaffe/kaffevm/jit3/funcs.h:1.6-1.7 Index: kaffe/ChangeLog diff -u kaffe/ChangeLog:1.4339 kaffe/ChangeLog:1.4340 --- kaffe/ChangeLog:1.4339 Thu Aug 11 22:07:49 2005 +++ kaffe/ChangeLog Fri Aug 12 01:58:39 2005 @@ -1,5 +1,10 @@ 2005-08-11 Andreas Tobler [EMAIL PROTECTED] + * kaffe/kaffevm/jit3/funcs.h: Add HAVE_move_register_float and + HAVE_move_register_double to fix compiler warnings. + +2005-08-11 Andreas Tobler [EMAIL PROTECTED] + * libraries/clib/math/BigInteger.c (Java_java_math_BigInteger_assignString0): Add return value to fix compiler warnings. Index: kaffe/kaffe/kaffevm/jit3/funcs.h diff -u kaffe/kaffe/kaffevm/jit3/funcs.h:1.6 kaffe/kaffe/kaffevm/jit3/funcs.h:1.7 --- kaffe/kaffe/kaffevm/jit3/funcs.h:1.6Fri Jul 1 17:54:33 2005 +++ kaffe/kaffe/kaffevm/jit3/funcs.hFri Aug 12 01:58:42 2005 @@ -542,6 +542,14 @@ extern void HAVE_move_register_ref (int toreg, int fromreg); #endif /* defined(HAVE_move_register_ref) */ +#if defined(HAVE_move_register_float) +extern void HAVE_move_register_float (int toreg, int fromreg); +#endif /* defined(HAVE_move_register_float) */ + +#if defined(HAVE_move_register_double) +extern void HAVE_move_register_double (int toreg, int fromreg); +#endif /* defined(HAVE_move_register_double) */ + #if defined(HAVE_mul_double) extern void HAVE_mul_double (sequence* s); #endif /* defined(HAVE_mul_double) */ ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
[kaffe] CVS kaffe (robilad): warning fix for jni
PatchSet 6816 Date: 2005/08/12 02:37:24 Author: robilad Branch: HEAD Tag: (none) Log: warning fix for jni 2005-08-11 Andreas Tobler [EMAIL PROTECTED] * kaffe/kaffevm/jni/jni.c (Kaffe_DefineClass): Cast buf to match the prototype of classFileInit. Members: ChangeLog:1.4341-1.4342 kaffe/kaffevm/jni/jni.c:1.36-1.37 Index: kaffe/ChangeLog diff -u kaffe/ChangeLog:1.4341 kaffe/ChangeLog:1.4342 --- kaffe/ChangeLog:1.4341 Fri Aug 12 02:26:07 2005 +++ kaffe/ChangeLog Fri Aug 12 02:37:24 2005 @@ -1,5 +1,10 @@ 2005-08-11 Andreas Tobler [EMAIL PROTECTED] + * kaffe/kaffevm/jni/jni.c (Kaffe_DefineClass): Cast buf to match the + prototype of classFileInit. + +2005-08-11 Andreas Tobler [EMAIL PROTECTED] + * libraries/clib/net/PlainSocketImpl.c (gnu_java_net_PlainSocketImpl_socketGetOption): Initialize r. Index: kaffe/kaffe/kaffevm/jni/jni.c diff -u kaffe/kaffe/kaffevm/jni/jni.c:1.36 kaffe/kaffe/kaffevm/jni/jni.c:1.37 --- kaffe/kaffe/kaffevm/jni/jni.c:1.36 Tue Jul 19 16:27:37 2005 +++ kaffe/kaffe/kaffevm/jni/jni.c Fri Aug 12 02:37:37 2005 @@ -99,7 +99,8 @@ loader = unveil(loader); - classFileInit(hand, NULL, buf, (size_t)len, CP_BYTEARRAY); + classFileInit(hand, NULL, (unsigned char*)buf, (size_t)len, + CP_BYTEARRAY); cls = newClass(); if (cls == 0) { ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
[kaffe] CVS kaffe (robilad): Warning fix for PlainSocketImpl
PatchSet 6815 Date: 2005/08/12 02:26:07 Author: robilad Branch: HEAD Tag: (none) Log: Warning fix for PlainSocketImpl 2005-08-11 Andreas Tobler [EMAIL PROTECTED] * libraries/clib/net/PlainSocketImpl.c (gnu_java_net_PlainSocketImpl_socketGetOption): Initialize r. Members: ChangeLog:1.4340-1.4341 libraries/clib/net/PlainSocketImpl.c:1.55-1.56 Index: kaffe/ChangeLog diff -u kaffe/ChangeLog:1.4340 kaffe/ChangeLog:1.4341 --- kaffe/ChangeLog:1.4340 Fri Aug 12 01:58:39 2005 +++ kaffe/ChangeLog Fri Aug 12 02:26:07 2005 @@ -1,5 +1,10 @@ 2005-08-11 Andreas Tobler [EMAIL PROTECTED] + * libraries/clib/net/PlainSocketImpl.c + (gnu_java_net_PlainSocketImpl_socketGetOption): Initialize r. + +2005-08-11 Andreas Tobler [EMAIL PROTECTED] + * kaffe/kaffevm/jit3/funcs.h: Add HAVE_move_register_float and HAVE_move_register_double to fix compiler warnings. Index: kaffe/libraries/clib/net/PlainSocketImpl.c diff -u kaffe/libraries/clib/net/PlainSocketImpl.c:1.55 kaffe/libraries/clib/net/PlainSocketImpl.c:1.56 --- kaffe/libraries/clib/net/PlainSocketImpl.c:1.55 Sat May 14 21:46:54 2005 +++ kaffe/libraries/clib/net/PlainSocketImpl.c Fri Aug 12 02:26:15 2005 @@ -621,7 +621,7 @@ { struct sockaddr_in addr; socklen_t alen = sizeof(addr); - int r, v; + int r = 0, v; socklen_t vsize = sizeof(v); unsigned int k; ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
Re: [kaffe] NetworkInterfaceTest fails on Linux 2.4.18-3
NetworkInterfaceTest fails when run on Linux 2.4.18-3. $ cat test/regression/NetworkInterfaceTest.fail /home/ito/kaffe/kaffe-snap-050804/kaffe/kaffe/.libs/lt-kaffe-bin: relocation error: /home/ito/kaffe/kaffe-snap-050804/libraries/clib/net/.libs/libnet-1.1.x-cvs.so: undefined symbol: getifaddrs $ nm replace/.libs/getifaddrs.o $ The following patch worked at least for me. ** --- replace/getifaddrs.c.orig Mon Jul 18 03:01:00 2005 +++ replace/getifaddrs.cFri Aug 12 11:24:25 2005 @@ -36,6 +36,8 @@ #define __close(x) close(x) #endif +#include ifaddrs_linux.c + #elif defined(SIOCGIFCONF) #include ifaddrs_bsd.c ** Is the deletion of ifaddrs_linux.c intentional, or by accident? ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe