Hi all,

A Segmentation fault occurs in the languages/lua/t/tables_3.pir.
This test is a simple table creation (with 1000 items) :

        a = {}
        for i=1,1000 do a[i] = i*2 end
        print(a[9])

This problem started with revision 11586.
In the previous Lua PMC implementation (r11478),
        LuaBoolean extends Boolean
        LuaNumber extends Float
        LuaString extends String
        LuaNil is a standalone PMC.

With r11586, I introduce an abstract PMC LuaBase, and these 4 Lua concrete types extend LuaBase.
In both revisions, LuaTable extends Hash.

But something is wrong or missing in this new implementation.

I obtain the following back trace :

#0  0x1005b8f9 in pobject_lives (interpreter=0x3f4158, obj=0x0)
    at src/dod.c:194
#1  0x1001902d in mark_hash (interpreter=0x3f4158, hash=0x768f28)
    at src/hash.c:211
#2  0x1016d95e in Parrot_Hash_mark (interpreter=0x3f4158, pmc=0x6ecb90)
    at src/pmc/hash.pmc:180
#3 0x1005be30 in Parrot_dod_trace_children (interpreter=0x3f4158, how_many=4294966799)
    at src/dod.c:455
#4  0x1005bc01 in trace_active_PMCs (interpreter=0x3f4158, trace_stack=1)
    at src/dod.c:372
#5  0x1005c591 in Parrot_dod_ms_run (interpreter=0x3f4158, flags=1)
    at src/dod.c:1172
#6  0x1005c64a in Parrot_do_dod_run (interpreter=0x3f4158, flags=1)
    at src/dod.c:1211
#7  0x1005a0a1 in more_traceable_objects (interpreter=0x3f4158, pool=0x3f4d20)
    at src/smallobject.c:114
#8  0x1005a120 in gc_ms_get_free_object (interpreter=0x3f4158, pool=0x3f4d20)
    at src/smallobject.c:162
#9  0x1005a885 in new_pmc_header (interpreter=0x3f4158, flags=0)
    at src/headers.c:254
#10 0x100163d1 in get_new_pmc_header (interpreter=0x3f4158, base_type=38, flags=0)
    at src/pmc.c:226
#11 0x10016426 in pmc_new_noinit (interpreter=0x3f4158, base_type=38)
    at src/pmc.c:264
#12 0x10016094 in pmc_new (interpreter=0x3f4158, base_type=38)
    at src/pmc.c:46
#13 0x1014489d in Parrot_default_getprop (interpreter=0x3f4158, pmc=0x7c0b18, key=0xb17658)
    at src/pmc/default.pmc:249
#14 0x009e2250 in ?? ()
#15 0x009ea5ea in ?? ()
#16 0x1009e499 in Parrot_set_p_k_p (cur_opcode=0x536e28, interpreter=0x3f4158)
    at src/ops/set.ops:476
#17 0x10014f39 in runops_slow_core (interpreter=0x3f4158, pc=0x536e28)
    at src/runops_cores.c:172
#18 0x10003e29 in runops_int (interpreter=0x3f4158, offset=0)
    at src/interpreter.c:775
#19 0x100080ef in Parrot_LuaString_i_subtract_LuaString ()
    at src/inter_run.c:81
#20 0x100082e0 in Parrot_LuaString_multiply_LuaString ()
    at src/inter_run.c:180
#21 0x100083c8 in Parrot_runops_fromc_args (interpreter=0x3f4158, sub=0x6ecb18, sig=0x101d87be "vP")
    at src/inter_run.c:274
#22 0x10054e02 in Parrot_runcode (interpreter=0x3f4158, argc=1, argv=0x3f4134)
    at src/embed.c:801
#23 0x0040288e in main (argc=1, argv=0x3f4134) at compilers/imcc/main.c:686


François.


Reply via email to