Hi,
On 12/16/2013 10:15, Nicholas Clark wrote:
Edited it to carry on with just NQP, and got a hit at 2013.
Starting program: /home/nicholas/Sandpit/burndown1/bin/moar
--libpath=src/vm/moar/stage0 src/vm/moar/stage0/nqp.moarvm --bootstrap
--module-path=gen/moar/stage1 --setting-path=gen/moar/stage1 --setting=NQPCORE
--target=mbc --no-regex-lib --output=gen/moar/stage1/nqp.moarvm
gen/moar/stage1/NQP.nqp[Thread debugging using libthread_db enabled]
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff79c7308 in run_load (tc=0x6023f0, sr_data=0x7ffff6a42e38)
at src/core/loadbytecode.c:109
109 if (cu->body.load_frame) {
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.107.el6.x86_64
(gdb) p cu
$1 = (MVMCompUnit *) 0x7ffff6a42e38
(gdb) p tc->nursery_fromspace
$2 = (void *) 0x7ffff68a2000
(gdb) p tc->nursery_tospace
$3 = (void *) 0x7ffff6a9a000
(gdb) where
#0 0x00007ffff79c7308 in run_load (tc=0x6023f0, sr_data=0x7ffff6a42e38)
at src/core/loadbytecode.c:109
#1 0x00007ffff79b707b in return_or_unwind (tc=0x6023f0, unwind=0 '\000')
at src/core/frame.c:341
#2 0x00007ffff79b70d2 in MVM_frame_try_return (tc=0x6023f0)
at src/core/frame.c:362
#3 0x00007ffff7998d7d in MVM_interp_run (tc=0x6023f0,
initial_invoke=0x7ffff7a2fac3 <toplevel_initial_invoke>,
invoke_data=0x74f570) at src/core/interp.c:279
#4 0x00007ffff7a2fbf0 in MVM_vm_run_file (instance=0x602010,
filename=0x7fffffffe76d "src/vm/moar/stage0/nqp.moarvm") at src/moar.c:157
#5 0x0000000000400d2e in main (argc=11, argv=0x7fffffffe498) at src/main.c:137
It look like the stored value caller->special_return_data got moved:
/* Switch back to the caller frame if there is one. */
if (caller && returner != tc->thread_entry_frame) {
tc->cur_frame = caller;
*(tc->interp_cur_op) = caller->return_address;
*(tc->interp_bytecode_start) = caller->static_info->body.bytecode;
*(tc->interp_reg_base) = caller->work;
*(tc->interp_cu) = caller->static_info->body.cu;
/* Handle any special return hooks. */
if (caller->special_return) {
MVMSpecialReturn sr = caller->special_return;
caller->special_return = NULL;
if (!unwind)
sr(tc, caller->special_return_data);
}
Again, I don't know what the fix should be, but having read the GC talk
slides, my hunch is that it's "you can't be storing unpinned things in a
C struct".
Well, you can, just make sure you update it. 9f7714d should fix this one.
Thanks!
Jonathan