[perl #35144] Core dump with computed-goto core

0 views
Skip to first unread message

Nick Glencross

unread,
Apr 28, 2005, 7:25:10 PM4/28/05
to bugs-bi...@rt.perl.org
# New Ticket Created by Nick Glencross
# Please include the string: [perl #35144]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=35144 >


Guys,

This isn't a highly critical segfault I imagine, although it might be of
interest to someone.

I discovered 'make fulltest' this evening. One of the debuginfo tests
(#7) fails as follows with r7942 on i386 Linux:

nickg@scrappy parrot $ /usr/bin/perl5.8.5 t/harness --gc-debug
--running-make-test -g t/op/debuginfo.t

t/op/debuginfo....ok 6/8# Failed test (t/op/debuginfo.t at line 160)
# 'maximum recursion depth exceeded
# current instr.: 'main' pc -1 ((unknown file):-1)
# called from Sub 'main' pc -1 ((unknown file):-1)
# '
# doesn't match '/^maximum recursion depth exceeded
# current instr\.: 'main' pc (\d+|-1) \(.*?:(\d+|-1)\)
# called from Sub 'main' pc (\d+|-1) \(.*?:(\d+|-1)\)
# \.\.\. call repeated 999 times$/
# '
t/op/debuginfo....NOK 7# Looks like you failed 1 tests of 8.
t/op/debuginfo....dubious
Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 7
Failed 1/8 tests, 87.50% okay (less 3 skipped tests: 4 okay, 50.00%)
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/op/debuginfo.t 1 256 8 1 12.50% 7
3 subtests skipped.
Failed 1/1 test scripts, 0.00% okay. 1/8 subtests failed, 87.50% okay.

There's a core dump (the last line of output wasn't printed), and a
backtrace reveals:

Loaded symbols for /lib/ld-linux.so.2
#0 0x080c578a in gc_ms_get_free_object (interpreter=0x8256db8,
pool=0x8257430)
at smallobject.c:165
165 PObj_flags_SETTO( (PObj*) ptr, 0);
(gdb) where
#0 0x080c578a in gc_ms_get_free_object (interpreter=0x8256db8,
pool=0x8257430)
at smallobject.c:165
#1 0x080c5ba7 in get_free_buffer (interpreter=0x8256db8, pool=0x8257430)
at headers.c:56
#2 0x080c612a in new_string_header (interpreter=0x8256db8, flags=8192)
at headers.c:352
#3 0x0808c553 in string_make_direct (interpreter=0x8256db8,
buffer=0x81f784d,
len=15, encoding=0x8257550, charset=0x8259ec8, flags=8192) at
string.c:666
#4 0x0808c518 in string_make (interpreter=0x8256db8, buffer=0x81f784d,
len=15, charset_name=0x81fb760 "iso-8859-1", flags=8192) at string.c:643
#5 0x080c92f8 in getstring_va (interpreter=0x8256db8, size=0,
obj=0xbfffeb60)
at spf_vtable.c:236
#6 0x080c8d6e in Parrot_sprintf_format (interpreter=0x8256db8,
pat=0x83b11e0,
obj=0xbfffeb60) at spf_render.c:713
#7 0x080c7a1e in Parrot_vsprintf_s (interpreter=0x8256db8, pat=0x83b11e0,
args=0xbfffebdc
"x\022>\bÿÿÿÿ\036x\037\bÿÿÿÿ`]?\b`]?\bMx\037\bH\023;\bMx\037\bx\022>\bX\022;\bx\022>\bÿÿÿÿ\036x\037\bÿÿÿÿ8ìÿ¿1")
at misc.c:68
#8 0x080c7a71 in Parrot_vsprintf_c (interpreter=0x8256db8,
pat=0x81f785d "%s '%Ss' pc %d (%s:%d)\n",
args=0xbfffebd8
"Mx\037\bx\022>\bÿÿÿÿ\036x\037\bÿÿÿÿ`]?\b`]?\bMx\037\bH\023;\bMx\037\bx\022>\bX\022;\bx\022>\bÿÿÿÿ\036x\037\bÿÿÿÿ8ìÿ¿1")
at misc.c:92
#9 0x080c7b3d in Parrot_sprintf_c (interpreter=0x8256db8,
pat=0x81f785d "%s '%Ss' pc %d (%s:%d)\n") at misc.c:177
#10 0x080901cc in Parrot_Context_infostr (interpreter=0x8256db8,
ctx=0x8449a90)
at sub.c:650
#11 0x080c54e9 in PDB_backtrace (interpreter=0x8256db8) at debug.c:2958
#12 0x081483f2 in find_exception_handler (interpreter=0x8256db8,
exception=0x826cf00) at exceptions.c:273
#13 0x08148525 in throw_exception (interpreter=0x8256db8,
exception=0x826cf00,
dest=0x8466f78) at exceptions.c:379
#14 0x081488d7 in create_exception (interpreter=0x8256db8) at
exceptions.c:544
#15 0x08148901 in handle_exception (interpreter=0x8256db8) at
exceptions.c:563
#16 0x0814a86b in runops (interpreter=0x8256db8, offs=0) at inter_run.c:57
#17 0x080c0824 in Parrot_runcode (interpreter=0x8256db8, argc=1,
argv=0xbfffee40) at embed.c:778
#18 0x080c0662 in Parrot_runcode (interpreter=0x8256db8, argc=1,
argv=0xbfffee40) at embed.c:712
#19 0x08083f2e in main (argc=1, argv=0xbfffee40) at main.c:605

(gdb) print * (PObj*)ptr
$3 = {obj = {u = {_b = {_bufstart = 0x27207325, _buflen = 661869349},
_ptrs = {
_struct_val = 0x27207325, _pmc_val = 0x27735325}, _i = {
_int_val = 656438053, _int_val2 = 661869349},
_num_val = 1.1973921390844648e-118, _string_val = 0x27207325},
flags = 543387680, _pobj_version = 673211429}}

Don't know enough about gdb to know if this is right...

(gdb) set ((PObj*) ptr)->obj.flags=0
Cannot access memory at address 0x81f7865


I haven't been able to reproduce this standalone outside the test
harness (but then I haven't tried very hard).

Regards,

Nick

Leopold Toetsch

unread,
Apr 29, 2005, 3:31:37 AM4/29/05
to perl6-i...@perl.org
Nick Glencross <parrotbug...@parrotcode.org> wrote:

> Guys,

> This isn't a highly critical segfault I imagine, although it might be of
> interest to someone.

> I discovered 'make fulltest' this evening. One of the debuginfo tests
> (#7) fails as follows with r7942 on i386 Linux:

> nickg@scrappy parrot $ /usr/bin/perl5.8.5 t/harness --gc-debug
> --running-make-test -g t/op/debuginfo.t

[ ...]

> t/op/debuginfo....NOK 7# Looks like you failed 1 tests of 8.

[ ...]

Yep. GC bug with CGoto run cores. Resetting the lo_var_ptr (the stack
"top" used for C stack tracing) was wrong. It did work some time ago,
but gcc seems to create different code now. The intention was to exclude
the rather big jump table from stack tracing.

Anyway, I have removed this hack, which fixes the segfault.

> Nick

Thanks for reporting,
leo

Reply all
Reply to author
Forward
0 new messages