Ticket #964 (closed bug: fixed)

Opened 5 years ago

Last modified 5 years ago

segfault in Parrot_str_new_COW

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

Description

With parrot r40897 and partcl r658;

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

(gdb) bt                 
#0  Parrot_str_new_COW (interp=0x804f040, s=0x0) at src/string/api.c:130
#1  0xb7d95f84 in Parrot_str_copy (interp=0x804f040, s=0x0)    at src/string/api.c:1052
#2  0xb7ee3e22 in Parrot_String_clone (interp=0x804f040, pmc=0xb4233ba8)    at ./src/pmc/string.pmc:95
#3  0xb7dacad2 in Parrot_copy_p_p (cur_opcode=0xb6f8bb4c, interp=0x804f040)    at src/ops/set.ops:498
#4  0xb7e07dd2 in runops_slow_core (interp=0x804f040, pc=0xb6f8bb4c)    at src/runcore/cores.c:462
#5  0xb7e0706f in runops_int (interp=0x804f040, offset=7406)    at src/runcore/main.c:987
#6  0xb7def402 in runops (interp=0x804f040, offs=3) at src/call/ops.c:119
#7  0xb7def589 in runops_args (interp=0x804f040, sub=0x80c29b8, obj=0x80b0bd0,     meth_unused=0x0, sig=0xb7f6c01b "vP", ap=0xbf9302fc "\030-\f\b")    at src/call/ops.c:269
#8  0xb7defd38 in Parrot_runops_fromc_args (interp=0x804f040, sub=0x80c29b8,     sig=0xb7f6c01b "vP") at src/call/ops.c:338
#9  0xb7dd9288 in Parrot_runcode (interp=0x804f040, argc=2, argv=0xbf930468)    at src/embed.c:983
#10 0xb7f58ecf in imcc_run (interp=0x804f040, sourcefile=0xbf93246e "tcl.pbc",     argc=2, argv=0xbf930468) at compilers/imcc/main.c:801
#11 0x08048955 in main (argc=2, argv=0xbf930468) at src/main.c:60

Change History

Changed 5 years ago by coke

Here's a PIR only program that generates a very similar backtrace:

.sub main :main

null $S0 $S1 = clone $S0 say $S1

.end

Changed 5 years ago by coke

Same program with wiki-fu

.sub main :main
 null $S0
 $S1 = clone $S0
 say $S1
.end

Changed 5 years ago by coke

(the corresponding PMC version also segfaults:

.sub main :main
 null $S0
 $P0 = box $S0
 $P1 = clone $P0
.end

Changed 5 years ago by chromatic

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

Fixed in r40948 - r40950.

Note: See TracTickets for help on using tickets.