Front page | perl.perl6.internals |
Postings from December 2001
Segfault with JIT
Thread Next
From:
Rafael Kitover
Date:
December 25, 2001 21:07
Subject:
Segfault with JIT
Message ID:
3C295ABE.1050607@debian.org
Hi all,
I've noticed that on this system (Athlon 1ghz, Debian unstable, gcc3)
certain example assembly programs, specfically: call, euclid, fact,
life, mops_p, queens, stack and substr all segfault.
Here is what I was able to find out, for the "substr" program, the
following is part of the disassembly of the JIT-ized code, according to GDB:
0x80edc88: push %ebp
0x80edc89: mov %esp,%ebp
0x80edc8b: movl $0x1,0x80dc018
0x80edc95: movl $0x0,0x80dc014
0x80edc9f: mov 0xbffff5d0,%eax
0x80edca4: mov %eax,0x80db720
0x80edca9: push $0x80ed930
0x80edcae: pushl 0x80db720
0x80edcb4: call 0x8057a60 <string_copy>
0x80edcb9: mov %eax,0x80e2014
0x80edcbe: movl $0x0,0x80dc01c
0x80edcc8: movl $0x0,0x80dc020
0x80edcd2: add %al,(%eax)
0x80edcd4: movl $0x1,0x80db724
0x80edcde: mov 0x80e2018,%eax
0x80edce3: mov (%eax),%eax
0x80edce5: mov %eax,0x80db720
0x80edcea: mov 0x80e2018,%eax
Notice the instructions:
0x80edcde: mov 0x80e2018,%eax
0x80edce3: mov (%eax),%eax
This is where it dies, 0x80e2018 contains a zero, and (%eax) attempts to
access it, segfault.
Unfortunately I'm not 3l33t enough to read hex yet, maybe I'll write a
little assembler for the .jit files? Or at least some sort of
disassembly display tool :)
print "Merry $your_holiday\n"
--
Rafael Kitover
Thread Next
-
Segfault with JIT
by Rafael Kitover