#1499: Null pointer dereference in imageio.pmc
----------------------+-----------------------------------------------------
Reporter: arnsholt | Owner: plobsing
Type: bug | Status: new
Priority: normal | Milestone:
Component: none | Version:
Severity: medium | Keywords:
Lang: perl6 | Patch:
Platform: darwin |
----------------------+-----------------------------------------------------
Comment(by arnsholt):
Replying to [comment:5 whiteknight]:
> I would suggest that it's probably not a problem with the init vtable as
likely as it is a problem with premature GC collection. When you see this
problem again in GDB, could you please capture the value of "p * pmc" and
"p * pmc->vtable->whoami", and post them here?
I managed to trigger a segfault again, but in visit_todo_list_thaw()
instead of visit_todo_list_freeze(). Backtrace:
{{{
(gdb) back
#0 0x0000000000000000 in ?? ()
#1 0x0000000100ce15b6 in visit_todo_list_thaw (interp=0x101208890,
info=0x10cadd220) at imageio.pmc:158
#2 0x0000000100ce174a in Parrot_ImageIO_set_string_native
(interp=0x101208890, pmc=0x10cadd220, image=0x10c3fff98) at
imageio.pmc:521
#3 0x0000000100b94ed5 in Parrot_thaw (interp=0x101208890,
image=0x10c3fff98) at src/pmc_freeze.c:134
#4 0x0000000100c6d0a9 in Parrot_default_clone (interp=0x101208890,
pmc=0x1061b7520) at default.pmc:1068
#5 0x0000000100b896f4 in Parrot_oo_clone_object (interp=0x101208890,
pmc=0x1061b7570, class_=0x102217ea8, dest=0x0) at src/oo.c:277
#6 0x0000000100cf9dba in Parrot_Object_clone (interp=0x101208890,
pmc=0x1061b7570) at object.pmc:723
#7 0x00000001011be039 in Parrot_P6opaque_clone ()
#8 0x0000000100a9cc06 in Parrot_clone_p_p (cur_opcode=0x101303b08,
interp=0x101208890) at set.ops:474
#9 0x0000000100b98864 in runops_fast_core (interp=0x101208890,
runcore=0x10121c2b0, pc=0x101303b08) at src/runcore/cores.c:670
#10 0x0000000100b9736c in runops_int (interp=0x101208890, offset=202378)
at src/runcore/main.c:549
#11 0x0000000100b5ad92 in runops (interp=0x101208890, offs=202378) at
src/call/ops.c:112
#12 0x0000000100b5049e in Parrot_pcc_invoke_from_sig_object
(interp=0x101208890, sub_obj=0x10256f868, call_object=0x1016f9f98) at
src/call/pcc.c:314
#13 0x0000000100b50652 in Parrot_pcc_invoke_sub_from_c_args
(interp=0x101208890, sub_obj=0x10256f868, sig=0x100d5cb7a "P->") at
src/call/pcc.c:75
#14 0x0000000100b33c36 in Parrot_runcode (interp=0x101208890, argc=2,
argv=0x7fff5fbff810) at src/embed.c:826
#15 0x0000000100000d69 in main ()
}}}
The PMC is named `todo` in this case:
{{{
(gdb) p *todo
$1 = {
flags = 524288,
vtable = 0x10c780cd0,
data = 0x111bc9070,
_metadata = 0x0,
_synchronize = 0x0
}
}}}
`todo->vtable->whoami` is NULL. I'll add todo->vtable as an attachment, to
keep the comments relatively uncluttered.
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1499#comment:6>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets