Ticket #967 (closed bug: fixed)

Opened 7 years ago

Last modified 7 years ago

segfault in utf8_set_position

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


With parrot r40897 and partcl r658;

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

#0  utf8_set_position (interp_unused=0x804f040, i=0xbfb2ab44, pos=4288207802)    at src/string/encoding/utf8.c:561
#1  0xb7e66e3c in find_not_cclass (interp=0x804f040, flags=32,     source_string=0xb57befcc, offset=4294967294, count=4)    at src/string/charset/unicode.c:975
#2  0xb7d5fff7 in Parrot_str_find_not_cclass (interp=0x804f040, flags=32,     s=0xb57befcc, offset=4294967294, count=4) at src/string/api.c:3136
#3  0xb7d74b29 in Parrot_find_not_cclass_i_ic_s_i_i (cur_opcode=0xb6f562ec,     interp=0x804f040) at src/ops/string.ops:649
#4  0xb7dd3dd2 in runops_slow_core (interp=0x804f040, pc=0xb6f562ec)    at src/runcore/cores.c:462
#5  0xb7dd306f in runops_int (interp=0x804f040, offset=23644)    at src/runcore/main.c:987
#6  0xb7dbb402 in runops (interp=0x804f040, offs=3) at src/call/ops.c:119
#7  0xb7dbb589 in runops_args (interp=0x804f040, sub=0x80c29b8, obj=0x80b0bd0,     meth_unused=0x0, sig=0xb7f3801b "vP", ap=0xbfb2acec "\030-\f\b")    at src/call/ops.c:269
#8  0xb7dbbd38 in Parrot_runops_fromc_args (interp=0x804f040, sub=0x80c29b8,     sig=0xb7f3801b "vP") at src/call/ops.c:338
#9  0xb7da5288 in Parrot_runcode (interp=0x804f040, argc=2, argv=0xbfb2ae58)    at src/embed.c:983
#10 0xb7f24ecf in imcc_run (interp=0x804f040, sourcefile=0xbfb2c46b "tcl.pbc",     argc=2, argv=0xbfb2ae58) at compilers/imcc/main.c:801
#11 0x08048955 in main (argc=2, argv=0xbfb2ae58) at src/main.c:60

Change History

Changed 7 years ago by coke

basic.test is now also affected by this segfault.

Changed 7 years ago by NotFound

  • owner set to NotFound
  • status changed from new to assigned

find_not_cclass was trying to access string content out of bounds. Fixed in r40974, not sure if is the correct solution but it no longer segfaults.

Changed 7 years ago by jkeenan

  • component changed from none to core

Changed 7 years ago by NotFound

  • status changed from assigned to closed
  • resolution set to fixed

No complaints in several days, closing ticket.

Note: See TracTickets for help on using tickets.