Menu

#28 segfault related to String encoding, JamVM 1.4.5 + Classpath

open
nobody
None
5
2007-04-05
2007-04-05
No

I have been running into a persistent error, namely that almost every time I run a Java program on a Gumstix computer, it runs normally (or dies with a segfault along the way) and then dies at the end with a segfault. Gumstix is a small computer which runs a ARM processor.

I am using JamVM 1.4.5 + Classpath 0.93 (most recent versions so far as I know). Also I am compiling Classpath with Jikes 1.22.5, and compiling my own programs with Jikes or javac from Java 1.5.0.

The problem seems to be related to string encoding: in some (maybe many cases) I can prevent the segfault by replacing all System.out.println(s) with System.out.println(new String(s.getBytes(), "US-ASCII")) i.e. explicitly specifying an encoding. Specifying -Dfile.encoding=US-ASCII seems to change the situation somewhat but doesn't fix it.

I can't extract anything useful from strace output. I have run jamvm with the -verbose option and also recompiled jamvm with --enable-tracedll which is interesting (shows library access from jamvm) but it doesn't indicate the source of the problem. valgrind is not available for the ARM processor.

I also tried running the same programs on JamVM + Classpath built on a X86 processor, and there was no segfault.

I know this is vague but it has proven extremely hard to pin down.

Thanks for your help. Robert Dodier

Discussion


Log in to post a comment.