2004-08-29

Jikes 1.21 on Mac OS 10.2.8

For reasons of a broken SuperDrive, my PowerBook is stuck on Mac OS 10.2.8. This didn't matter to me, because I haven't done any development on it in over a year, but right now I'm moving, and the PowerBook is the only machine I can guarantee I'll have to hand for a while. So I care again.

If I try something like this on Mac OS 10.2.8 with Jikes built today from CVS:

titanium:~$ cat test.java
public class test {
public static void main(String[] args) {
for (int i = 0; i < args.length; ++i) {
System.out.println(args[i]);
}
}
}
titanium:~$ ~/OpenSource/jikes/src/jikes -bootclasspath /System/Library/Frameworks/JavaVM.framework/Classes/classes.jar test.java

I get crashes like this:

Date/Time: 2004-08-29 22:20:48 +0100
OS Version: 10.2.8 (Build 6R73)
Host: titanium

Command: jikes
PID: 21023

Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_INVALID_ADDRESS (0x0001) at 0x4f244fe4

Thread 0 Crashed:
#0 0x000bd8dc in Utf8LiteralTable::FindOrInsert(char const*, int) (lookup.cpp:1383)
#1 0x00144db4 in Zip::ProcessSubdirectoryEntries(DirectorySymbol*, char*, int) (zip.cpp:518)
#2 0x000e8308 in Zip::ReadDirectory() (zip.cpp:163)
#3 0x000e1ebc in Control::ProcessBootClassPath() (system.cpp:595)
#4 0x000e18dc in Control::ProcessPath() (system.cpp:445)
#5 0x0004830c in Control::Control[unified](char**, Option&) (control.cpp:154)
#6 0x000b6aec in JikesAPI::compile(char**) (jikesapi.cpp:211)
#7 0x000b6320 in main (jikes.cpp:116)
#8 0x00001fb8 in _start (crt.c:267)
#9 0x00001e38 in start

PPC Thread State:
srr0: 0x000bd8dc srr1: 0x0000d030 vrsave: 0x00000000
xer: 0x20000000 lr: 0x000bd880 ctr: 0x00000000 mq: 0x00000000
r0: 0x13c913f9 r1: 0xbffff720 r2: 0x00000046 r3: 0x01070cc0
r4: 0x01081b20 r5: 0x00000008 r6: 0xffffffe0 r7: 0xffffffc0
r8: 0xffffff80 r9: 0x00000000 r10: 0x00000008 r11: 0x00000000
r12: 0x00000000 r13: 0x01070914 r14: 0x010708f4 r15: 0x01070a48
r16: 0x010708bc r17: 0x010709b8 r18: 0x01081b00 r19: 0x01070884
r20: 0x01081b00 r21: 0x010818b0 r22: 0x010c002e r23: 0x01081b20
r24: 0x4f244fe4 r25: 0x00000008 r26: 0x01070cc0 r27: 0x13c913f9
r28: 0x00000008 r29: 0x01082180 r30: 0x01081b20 r31: 0x000bd880

The symbol in question seems to be "META-INF". If I scp the .jar to my Mac OS 10.3 machine, everything's fine. I can't reproduce the problem there.

So I re-build Jikes on the PowerBook (taking about 9 minutes; this is why I do no development on this machine) after manually changing the CFLAGS to remove the -O2, so I'll be able to get a clearer picture of what's going on in the debugger. And now Jikes works fine.

Until someone convinces me there's a problem with Jikes, rather than with gcc 3.1 20020420 on Mac OS 10.2.8, I just stopped caring. I can live with an unoptimized build. Using Jikes instead of javac and make(1) instead of Ant makes this a usable development machine.