Ticket #965 (closed bug: fixed)

Opened 5 years ago

Last modified 5 years ago

segfault in Parrot_convert_arg

Reported by: coke Owned by:
Priority: major Milestone:
Component: core Version: trunk
Severity: fatal Keywords:
Cc: Language: tcl
Patch status: Platform:

Description

With parrot r40897 and partcl r658;

running parrot tcl.pbc t_tcl/mathop.test (need to run "make t_tcl" first to checkout the test files),

(key is null when this is run.)

(gdb) bt
#0  Parrot_convert_arg (interp=0x804f040, st=0xbfb77aa0) at src/call/pcc.c:1196
#1  0xb7d2265f in Parrot_process_args (interp=0x804f040, st=0xbfb77aa0,     param_or_result=PARROT_PASS_PARAMS) at src/call/pcc.c:1703
#2  0xb7d230ea in parrot_pass_args (interp=0x804f040, src_ctx=0xc563f30,     dest_ctx=0xc4898f8, src_indexes=0xb6eaf540, dest_indexes=0xb6ec138c,     param_or_result=PARROT_PASS_PARAMS) at src/call/pcc.c:1897
#3  0xb7ceef1c in Parrot_get_params_pc (cur_opcode=0xb6ec138c,     interp=0x804f040) at src/ops/core.ops:555
#4  0xb7d3ddd2 in runops_slow_core (interp=0x804f040, pc=0xb6ec138c)    at src/runcore/cores.c:462
#5  0xb7d3d06f in runops_int (interp=0x804f040, offset=7406)    at src/runcore/main.c:987
#6  0xb7d25402 in runops (interp=0x804f040, offs=1894) at src/call/ops.c:119
#7  0xb7d25589 in runops_args (interp=0x804f040, sub=0x8103ab0,     obj=0xb6179d78, meth_unused=0x8074060, sig=0xb7c8de58 "I",     ap=0xbfb77ca4 "?\234\027??\234\027??????\016\vh???|???\032¿@?\004\bx\235\027?\210?????h??@?\004\b\030}????¿h??@?\004\b\b}??*\237¿")    at src/call/ops.c:269
#8  0xb7d25a42 in Parrot_run_meth_fromc_args_reti (interp=0x804f040,     sub=0x8103ab0, obj=0xb6179d78, meth=0x8074060, sig=0xb7c8de58 "I")    at src/call/ops.c:514
#9  0xb7c8cc10 in Parrot_TclString_get_bool (interp=0x804f040, pmc=0xb6179d78)    at ./tclstring.pmc:46
#10 0xb7cd1aa2 in Parrot_isfalse_i_p (cur_opcode=0xb6edcd68, interp=0x804f040)    at src/ops/cmp.ops:738
#11 0xb7d3ddd2 in runops_slow_core (interp=0x804f040, pc=0xb6edcd68)    at src/runcore/cores.c:462
#12 0xb7d3d06f in runops_int (interp=0x804f040, offset=1894)    at src/runcore/main.c:987
#13 0xb7d25402 in runops (interp=0x804f040, offs=1894) at src/call/ops.c:119
#14 0xb7d25589 in runops_args (interp=0x804f040, sub=0x8103ab0,     obj=0xb61abe78, meth_unused=0x8074060, sig=0xb7c8de58 "I",     ap=0xbfb77e14 "¿\032??\032???¿?#\204\nh??H~???\032¿@?\004\bx?\032?\210??????@?\004\b\210~????¿h??@?\004\bx~??*\237¿") at src/call/ops.c:269
#15 0xb7d25a42 in Parrot_run_meth_fromc_args_reti (interp=0x804f040,     sub=0x8103ab0, obj=0xb61abe78, meth=0x8074060, sig=0xb7c8de58 "I")    at src/call/ops.c:514
#16 0xb7c8cc10 in Parrot_TclString_get_bool (interp=0x804f040, pmc=0xb61abe78)    at ./tclstring.pmc:46
#17 0xb7cd1aa2 in Parrot_isfalse_i_p (cur_opcode=0xb6edcd68, interp=0x804f040)    at src/ops/cmp.ops:738
#18 0xb7d3ddd2 in runops_slow_core (interp=0x804f040, pc=0xb6edcd68)    at src/runcore/cores.c:462
#19 0xb7d3d06f in runops_int (interp=0x804f040, offset=1894)    at src/runcore/main.c:987
#20 0xb7d25402 in runops (interp=0x804f040, offs=1894) at src/call/ops.c:119?\177??*\237¿")    at src/call/ops.c:269

#22 0xb7d25a42 in Parrot_run_meth_fromc_args_reti (interp=0x804f040,     sub=0x8103ab0, obj=0xb673a368, meth=0x8074060, sig=0xb7c8de58 "I")    at src/call/ops.c:514
#23 0xb7c8cc10 in Parrot_TclString_get_bool (interp=0x804f040, pmc=0xb673a368)    at ./tclstring.pmc:46
#24 0xb7cd1aa2 in Parrot_isfalse_i_p (cur_opcode=0xb6edcd68, interp=0x804f040)    at src/ops/cmp.ops:738
#25 0xb7d3ddd2 in runops_slow_core (interp=0x804f040, pc=0xb6edcd68)    at src/runcore/cores.c:462
#26 0xb7d3d06f in runops_int (interp=0x804f040, offset=1894)    at src/runcore/main.c:987
#27 0xb7d25402 in runops (interp=0x804f040, offs=1894) at src/call/ops.c:119
#28 0xb7d25589 in runops_args (interp=0x804f040, sub=0x8103ab0,     obj=0xb6d6d400, meth_unused=0x8074060, sig=0xb7c8de58 "I",     ap=0xbfb780f4 "0?¿H?¿???pvX\vh??(\201???\032¿@?\004\b")    at src/call/ops.c:269
#29 0xb7d25a42 in Parrot_run_meth_fromc_args_reti (interp=0x804f040,     sub=0x8103ab0, obj=0xb6d6d400, meth=0x8074060, sig=0xb7c8de58 "I")    at src/call/ops.c:514
#30 0xb7c8cc10 in Parrot_TclString_get_bool (interp=0x804f040, pmc=0xb6d6d400)    at ./tclstring.pmc:46
#31 0xb7cd1aa2 in Parrot_isfalse_i_p (cur_opcode=0xb6edcd68, interp=0x804f040)    at src/ops/cmp.ops:738
#32 0xb7d3ddd2 in runops_slow_core (interp=0x804f040, pc=0xb6edcd68)    at src/runcore/cores.c:462
#33 0xb7d3d06f in runops_int (interp=0x804f040, offset=154)    at src/runcore/main.c:987
#34 0xb7d25402 in runops (interp=0x804f040, offs=1894) at src/call/ops.c:119
#35 0xb7d25589 in runops_args (interp=0x804f040, sub=0x8103ab0,     obj=0xb61c5ab0, meth_unused=0x8074060, sig=0xb7c8de58 "I",     ap=0xbfb78264 "?W\034??W\034???¿??U\th??\230\202???\032¿@?\004\b?Z\034?\2

10?????h??@?\004\b?\202????¿h??@?\004\b?\202??*\237¿")    at src/call/ops.c:269
#36 0xb7d25a42 in Parrot_run_meth_fromc_args_reti (interp=0x804f040,     sub=0x8103ab0, obj=0xb61c5ab0, meth=0x8074060, sig=0xb7c8de58 "I")    at src/call/ops.c:514
#37 0xb7c8cc10 in Parrot_TclString_get_bool (interp=0x804f040, pmc=0xb61c5ab0)    at ./tclstring.pmc:46
#38 0xb7cd1aa2 in Parrot_isfalse_i_p (cur_opcode=0xb6edcd68, interp=0x804f040)    at src/ops/cmp.ops:738
#39 0xb7d3ddd2 in runops_slow_core (interp=0x804f040, pc=0xb6edcd68)    at src/runcore/cores.c:462
#40 0xb7d3d06f in runops_int (interp=0x804f040, offset=1894)    at src/runcore/main.c:987
#41 0xb7d25402 in runops (interp=0x804f040, offs=1894) at src/call/ops.c:119
#42 0xb7d25589 in runops_args (interp=0x804f040, sub=0x8103ab0,     obj=0xb6d84368, meth_unused=0x8074060, sig=0xb7c8de58 "I",     ap=0xbfb783d4 "?B¿?B¿???X\002 \th??\b\204???\032¿@?\004\bhC¿\210?????h??@?\004\bH\204????¿h??@?\004\b<?¿?8?`\204??K.¿:¿\a??\001")    at src/call/ops.c:269
#43 0xb7d25a42 in Parrot_run_meth_fromc_args_reti (interp=0x804f040,     sub=0x8103ab0, obj=0xb6d84368, meth=0x8074060, sig=0xb7c8de58 "I")    at src/call/ops.c:514
#44 0xb7c8cc10 in Parrot_TclString_get_bool (interp=0x804f040, pmc=0xb6d84368)    at ./tclstring.pmc:46
#45 0xb7cd1aa2 in Parrot_isfalse_i_p (cur_opcode=0xb6edcd68, interp=0x804f040)    at src/ops/cmp.ops:738
#46 0xb7d3ddd2 in runops_slow_core (interp=0x804f040, pc=0xb6edcd68)    at src/runcore/cores.c:462
#47 0xb7d3d06f in runops_int (interp=0x804f040, offset=7406)    at src/runcore/main.c:987
#48 0xb7d25402 in runops (interp=0x804f040, offs=3) at src/call/ops.c:119
#49 0xb7d25589 in runops_args (interp=0x804f040, sub=0x80c29b8, obj=0x80b0bd0,     meth_unused=0x0, sig=0xb7ea201b "vP", ap=0xbfb7853c "\030-\f\b")    at src/call/ops.c:269
#50 0xb7d25d38 in Parrot_runops_fromc_args (interp=0x804f040, sub=0x80c29b8,     sig=0xb7ea201b "vP") at src/call/ops.c:338
#51 0xb7d0f288 in Parrot_runcode (interp=0x804f040, argc=2, argv=0xbfb786a8)    at src/embed.c:983
#52 0xb7e8eecf in imcc_run (interp=0x804f040, sourcefile=0xbfb7a46e "tcl.pbc",     argc=2, argv=0xbfb786a8) at compilers/imcc/main.c:80
#53 0x08048955 in main (argc=2, argv=0xbfb786a8) at src/main.c:60

Change History

Changed 5 years ago by jkeenan

  • component changed from none to core

Changed 5 years ago by chromatic

How does this fare after the pcc_reapply merge? Did you get rid of Parrot_run_meth_fromc_args_reti?

Changed 5 years ago by coke

  • status changed from new to closed
  • version changed from 1.5.0 to trunk
  • resolution set to fixed

Good catch; after the pcc branch hit trunk, Parrot_run_meth_fromc_args_reti was removed, so I had to rewrite TclString' s get_bool vtable.

I can no longer duplicate this segfault, closing ticket.

Note: See TracTickets for help on using tickets.