Ticket #1136 (closed bug: fixed)

Opened 12 years ago

Last modified 12 years ago

interactive partcl segfaults in Parrot_str_byte_length

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

Description

with latest partcl, ./tclsh segfaults instead of going into interactive mode.

backtrace:

#0  Parrot_str_byte_length (interp_unused=0x20e8010, s=0x0)
    at src/string/api.c:902
#1  0x00007fa51ba06db6 in Parrot_substr_s_s_i (cur_opcode=0x7fa51bedbd68,
    interp=0x20e8010) at src/ops/string.ops:271
#2  0x00007fa51ba6d8cd in runops_fast_core (interp=0x20e8010,
    runcore=<value optimized out>, pc=0x20e8010) at src/runcore/cores.c:665
#3  0x00007fa51ba6d161 in runops_int (interp=0x20e8010, offset=0)
    at src/runcore/main.c:545
#4  0x00007fa51ba464e1 in runops (interp=0x20e8010, offs=<value optimized out>)
    at src/call/ops.c:97
#5  0x00007fa51ba40aeb in Parrot_pcc_invoke_from_sig_object (interp=0x20e8010,
    sub_obj=<value optimized out>, call_object=<value optimized out>)
    at src/call/pcc.c:243
#6  0x00007fa51ba40bc4 in Parrot_pcc_invoke_sub_from_c_args (interp=0x20e8010,
    sub_obj=0x22073d8, sig=<value optimized out>) at src/call/pcc.c:66
#7  0x0000000000400d2b in main (argc=1, argv=0x7fff240017f8) at tcl.c:444

the value of s to this argument is NULL. The function doesn't declare this as a non null parameter; so, we should probably have a null check inside the function.

Change History

Changed 12 years ago by chromatic

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

Fixed in r42173.

Note: See TracTickets for help on using tickets.