#1009: examples/shootout/spectralnorm.pir shows a segfault in the continuation 
PMC
set_pointer() VTABLE
---------------------+------------------------------------------------------
 Reporter:  darbelo  |       Owner:       
     Type:  bug      |      Status:  new  
 Priority:  normal   |   Milestone:       
Component:  none     |     Version:  trunk
 Severity:  medium   |    Keywords:       
     Lang:           |       Patch:       
 Platform:  openbsd  |  
---------------------+------------------------------------------------------
 As the summary states, examples/shootout/spectralnorm.pir shows a segfault
 in the continuation PMC set_pointer() VTABLE. So far I've only seen this
 happen on OpenBSD amd64 and the failure does not show up in all runs of
 the program.

 The cause for the segfault is an invalid 'pos' pointer, which chromatic
 stated on IRC points to a problem in in the exit op, specifically line 889
 or 890 of src/ops/core.ops

 For reference here is the backtrace:

 {{{
 #0  0x000000020f7149ac in Parrot_Continuation_set_pointer
 (interp=0x20b6b8c00, pmc=0x2014a1540,
     value=0x2014a4000) at continuation.pmc:190
 190             if (pos && (*pos == PARROT_OP_get_results_pc))
 (gdb) bt
 #0  0x000000020f7149ac in Parrot_Continuation_set_pointer
 (interp=0x20b6b8c00, pmc=0x2014a1540,
     value=0x2014a4000) at continuation.pmc:190
 #1  0x000000020f63c046 in new_ret_continuation_pmc (interp=0x20b6b8c00,
 address=0x2014a4000)
     at src/sub.c:68
 #2  0x000000020f53f11d in Parrot_exit_ic (cur_opcode=0x2014a3ff0,
 interp=0x20b6b8c00) at core.ops:890
 #3  0x000000020f634df6 in runops_slow_core (interp=0x20b6b8c00,
 runcore=0x206772c00, pc=0x2014a3ff0)
     at src/runcore/cores.c:955
 #4  0x000000020f6332b2 in runops_int (interp=0x20b6b8c00, offset=210) at
 src/runcore/main.c:640
 #5  0x000000020f5edd53 in runops (interp=0x20b6b8c00, offs=210) at
 src/call/ops.c:119
 #6  0x000000020f5ee120 in runops_args (interp=0x20b6b8c00,
 sub=0x200d574d0, obj=0x2075525e0,
     meth_unused=0x0, sig=0x20f90e9e2 "vP", ap=0x7f7ffffbd1b0) at
 src/call/ops.c:269
 #7  0x000000020f5ee3f5 in Parrot_runops_fromc_args (interp=0x20b6b8c00,
 sub=0x200d574d0,
     sig=0x20f90e9e2 "vP") at src/call/ops.c:338
 #8  0x000000020f5c7cf3 in Parrot_runcode (interp=0x20b6b8c00, argc=1,
 argv=0x7f7ffffbd408)
     at src/embed.c:852
 #9  0x000000020f7e4c6e in imcc_run_pbc (interp=0x20b6b8c00, obj_file=0,
 output_file=0x0, argc=1,
     argv=0x7f7ffffbd408) at compilers/imcc/main.c:797
 #10 0x000000020f7e5836 in imcc_run (interp=0x20b6b8c00,
     sourcefile=0x7f7ffffbd8b7 "examples/shootout/spectralnorm.pir",
 argc=1, argv=0x7f7ffffbd408)
     at compilers/imcc/main.c:1088
 #11 0x0000000000400eb5 in main (argc=1, argv=0x7f7ffffbd408) at
 src/main.c:60
 (gdb)
 }}}

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/1009>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to