The function incorrectly used non-static field getter which was tracked down with help of valgrind:
==6229== Invalid read of size 4 ==6229== at 0x8075E8C: vm_jni_get_static_double_field (object.h:154) ==6229== by 0x639A3B6: Java_java_lang_VMDouble_initIDs (in /usr/lib/classpath/libjavalang.so.0.0.0) ==6229== by 0x89DCC34: ??? ==6229== by 0x218BB927: ??? ==6229== by 0x806B6B6: jit_magic_trampoline (class.h:99) ==6229== by 0x89DCA3C: ??? ==6229== by 0x89DCB2D: ??? ==6229== by 0x1EEF47A7: ??? ==6229== by 0x1EEF47A7: ??? ==6229== by 0x1EEF47A7: ??? ==6229== by 0x1EEF47A7: ??? ==6229== by 0x1EEF47A7: ??? ==6229== Address 0x1f0d51f8 is not stack'd, malloc'd or (recently) free'd Signed-off-by: Tomek Grabiec <tgrab...@gmail.com> --- vm/jni-interface.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/vm/jni-interface.c b/vm/jni-interface.c index 73cfba2..7e502b7 100644 --- a/vm/jni-interface.c +++ b/vm/jni-interface.c @@ -743,7 +743,7 @@ vm_jni_get_static_double_field(struct vm_jni_env *env, jobject object, return 0; } - return field_get_double(object, field); + return static_field_get_double(field); } #define DEFINE_SET_STATIC_FIELD(func, type, set) \ -- 1.6.0.4 ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel