#276: t/dynpmc/foo fails
--------------------+-------------------------------------------------------
Reporter: kjs | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: core | Version: trunk
Severity: medium | Keywords: dynpmc
Lang: | Patch:
Platform: win32 |
--------------------+-------------------------------------------------------
Comment(by rurban):
my backtrace for every loadlib on dynpmc on mingw32 is:
{{{
src\string\api.c:767: failed assertion 'encoding'
(gdb) b src\string\api.c:767
Breakpoint 1, Parrot_str_new_init (interp=0x3d25b8, buffer=0x74a702
"fixed_8", len=7, encoding=0x3d4d60, cha
flags=12288) at src/string/api.c:767
767 ASSERT_ARGS(Parrot_str_new_init)
(gdb) bt
#0 Parrot_str_new_init (interp=0x3d25b8, buffer=0x74a702 "fixed_8",
len=7, encoding=0x3d4d60, charset=0x0,
flags=12288) at src/string/api.c:767
#1 0x00404c0a in Parrot_str_new_constant (interp=0x3d25b8,
buffer=0x74a702 "fixed_8") at src/string/api.c:6
#2 0x00476900 in register_encoding (interp=0x3d25b8,
encodingname=0x74a702 "fixed_8", encoding=0x3d4d60)
at src/string/encoding.c:341
#3 0x00476a0b in Parrot_register_encoding (interp=0x3d25b8,
encodingname=0x74a702 "fixed_8", encoding=0x3d4
at src/string/encoding.c:374
#4 0x004e19f4 in Parrot_encoding_fixed_8_init (interp=0x3d25b8) at
src/string/encoding/fixed_8.c:647
#5 0x0047617b in Parrot_charsets_encodings_init (interp=0x3d25b8) at
src/string/charset.c:455
#6 0x00405225 in Parrot_str_init (interp=0x3d25b8) at
src/string/api.c:304
#7 0x00401759 in make_interpreter (parent=0x0, flags=0) at
src/inter_create.c:179
#8 0x00408db9 in Parrot_new (parent=0x0) at src/embed.c:103
#9 0x0040132b in main (argc=2, argv=0x3d2520) at src/main.c:52
(gdb) p *encoding
$1 = {name = 0x74a702 "fixed_8", max_bytes_per_codepoint = 1, to_encoding
= 0x4e0f40 <to_encoding>,
get_codepoint = 0x4e1030 <get_codepoint>, set_codepoint = 0x4e1150
<set_codepoint>, get_byte = 0x4e0fa0 <get_byte>,
set_byte = 0x4e10b0 <set_byte>, get_codepoints = 0x4e1290
<get_codepoints>,
get_codepoints_inplace = 0x4e13f0 <get_codepoints_inplace>, get_bytes =
0x4e11d0 <get_bytes>,
get_bytes_inplace = 0x4e1320 <get_bytes_inplace>, set_codepoints =
0x4e1550 <set_codepoints>,
set_bytes = 0x4e14a0 <set_bytes>, become_encoding = 0x4e1600
<become_encoding>, codepoints = 0x4e16a0 <codepoints>,
bytes = 0x4e1660 <bytes>, iter_init = 0x4e18a0 <iter_init>}
(gdb) b src\string\api.c:767 if !encoding
(gdb) c
Continuing.
Breakpoint 3, Parrot_str_new_init (interp=0x3d25b8, buffer=0x6778879a
"DynLexPad", len=9, encoding=0x0, charset=0x0,
flags=12288) at src/string/api.c:767
767 ASSERT_ARGS(Parrot_str_new_init)
(gdb) bt
#0 Parrot_str_new_init (interp=0x3d25b8, buffer=0x6778879a "DynLexPad",
len=9, encoding=0x0, charset=0x0,
flags=12288) at src/string/api.c:767
#1 0x686820ba in Parrot_str_new_constant (interp=0x3d25b8,
buffer=0x6778879a "DynLexPad") at src/string/api.c:687
#2 0x677843e3 in Parrot_lib_dynlexpad_load (interp=0x3d25b8) at
dynlexpad.c:1453
#3 0x004cd8a8 in Parrot_init_lib (interp=0x3d25b8, load_func=0x677843b0
<Parrot_lib_dynlexpad_load>, init_func=0)
at src/dynext.c:349
#4 0x004cda5a in run_init_lib (interp=0x3d25b8, handle=0x67780000,
lib_name=0xe82490, wo_ext=0xe82490)
at src/dynext.c:414
#5 0x004ce13c in Parrot_load_lib (interp=0x3d25b8, lib=0xdf4f90,
initializer_unused=0x0) at src/dynext.c:621
#6 0x0042ccab in Parrot_loadlib_p_sc (cur_opcode=0xea0c00,
interp=0x3d25b8) at src/ops/core.ops:1330
#7 0x0060019f in runops_slow_core (interp=0x3d25b8, pc=0xea0c00) at
src/runops_cores.c:228
#8 0x004b61cf in runops_int (interp=0x3d25b8, offset=0) at
src/interpreter.c:978
#9 0x00410fb6 in runops (interp=0x3d25b8, offs=0) at src/inter_run.c:108
#10 0x00411207 in runops_args (interp=0x3d25b8, sub=0xe72128,
obj=0xe2e198, meth_unused=0x0, sig=0x725d17 "vP",
ap=0x22febc "\020!รพ") at src/inter_run.c:248
#11 0x00411f18 in Parrot_runops_fromc_args (interp=0x3d25b8, sub=0xe72128,
sig=0x725d17 "vP") at src/inter_run.c:315
#12 0x00409e89 in Parrot_runcode (interp=0x3d25b8, argc=1, argv=0x3d2524)
at src/embed.c:984
#13 0x00403135 in imcc_run_pbc (interp=0x3d25b8, obj_file=0,
output_file=0x0, argc=1, argv=0x3d2524)
at compilers/imcc/main.c:824
#14 0x00403ca3 in imcc_run (interp=0x3d25b8, sourcefile=0x3d24ad
"t\\\\dynpmc\\\\dynlexpad_1.pir", argc=1,
argv=0x3d2524) at compilers/imcc/main.c:1111
#15 0x004013a0 in main (argc=1, argv=0x3d2524) at src/main.c:61
}}}
Infinoid knows why:
Does it happen at the very beginning of parrot execution, before any
encodings have been registered? (the default encoding pointer will be
NULL in that case)
http://irclog.perlgeek.de/parrot/2009-02-06#i_889824
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/276#comment:3>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets