#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):
I tried to workaround this by adding this, but it failed.
There are more missing structures on a dynpmc dll init.
{{{
--- src/string/api.c (revision 36403)
+++ src/string/api.c (working copy)
@@ -684,6 +684,13 @@
if (s)
return s;
+#ifdef WIN32
+ if (!PARROT_DEFAULT_CHARSET) { /* hack for TT #276, dynpmc init only
on Win32 */
+ Parrot_charsets_encodings_init(interp);
+ printf("Parrot_str_new_constant re-init: charset=0x%x,
encoding=0x%x\n",
+ PARROT_DEFAULT_CHARSET, PARROT_DEFAULT_ENCODING);
+ }
+#endif
s = Parrot_str_new_init(interp, buffer, strlen(buffer),
PARROT_DEFAULT_ENCODING, PARROT_DEFAULT_CHARSET,
PObj_external_FLAG|PObj_constant_FLAG);
}}}
=>
{{{
parrot-mingw>parrot t\dynpmc\dynlexpad_1.pir
Parrot_str_new_constant re-init: charset=0xe8fea0, encoding=0xe8f688
Null PMC access in get_integer()
current instr.: 'main' pc 0 (t\dynpmc\dynlexpad_1.pir:3)
}}}
{{{
(gdb) b Parrot_Null_get_integer
Breakpoint 3 at 0x5f4e86: file src/pmc/null.c, line 463. (2 locations)
(gdb) run
Starting program: N:\usr\src\perl\parrot\parrot-mingw/parrot.exe
t\\dynpmc\\dynlexpad_1.pir
[New thread 4640.0x1454]
Parrot_str_new_constant re-init: charset=0xea0008, encoding=0xe9fdb8
Breakpoint 3, Parrot_Null_get_integer (interp=0x3d25b8, pmc=0xe2e198) at
src/pmc/null.c:463
463 {
(gdb) bt
#0 Parrot_Null_get_integer (interp=0x3d25b8, pmc=0xe2e198) at
src/pmc/null.c:463
#1 0x68737fe1 in pmc_type (interp=0x3d25b8, name=0xdf4e78) at
src/pmc.c:597
#2 0x68738069 in pmc_register (interp=0x3d25b8, name=0xdf4e78) at
src/pmc.c:551
#3 0x677843fa in Parrot_lib_dynlexpad_load (interp=0x3d25b8) at
dynlexpad.c:1454
#4 0x004cd908 in Parrot_init_lib (interp=0x3d25b8, load_func=0x677843b0
<Parrot_lib_dynlexpad_load>, init_func=0)
at src/dynext.c:349
#5 0x004cdaba in run_init_lib (interp=0x3d25b8, handle=0x67780000,
lib_name=0xe82490, wo_ext=0xe82490)
at src/dynext.c:414
#6 0x004ce19c in Parrot_load_lib (interp=0x3d25b8, lib=0xdf4f90,
initializer_unused=0x0) at src/dynext.c:621
#7 0x0042cd0b in Parrot_loadlib_p_sc (cur_opcode=0xea0c00,
interp=0x3d25b8) at src/ops/core.ops:1330
#8 0x006001ff in runops_slow_core (interp=0x3d25b8, pc=0xea0c00) at
src/runops_cores.c:228
#9 0x004b622f in runops_int (interp=0x3d25b8, offset=0) at
src/interpreter.c:978
#10 0x00411016 in runops (interp=0x3d25b8, offs=0) at src/inter_run.c:108
#11 0x00411267 in runops_args (interp=0x3d25b8, sub=0xe72128,
obj=0xe2e198, meth_unused=0x0, sig=0x725d77 "vP",
ap=0x22febc "\020!รพ") at src/inter_run.c:248
#12 0x00411f78 in Parrot_runops_fromc_args (interp=0x3d25b8, sub=0xe72128,
sig=0x725d77 "vP") at src/inter_run.c:315
#13 0x00409ee9 in Parrot_runcode (interp=0x3d25b8, argc=1, argv=0x3d2524)
at src/embed.c:984
#14 0x00403135 in imcc_run_pbc (interp=0x3d25b8, obj_file=0,
output_file=0x0, argc=1, argv=0x3d2524)
at compilers/imcc/main.c:824
#15 0x00403ca3 in imcc_run (interp=0x3d25b8, sourcefile=0x3d24ad
"t\\\\dynpmc\\\\dynlexpad_1.pir", argc=1,
argv=0x3d2524) at compilers/imcc/main.c:1111
#16 0x004013a0 in main (argc=1, argv=0x3d2524) at src/main.c:61
(gdb)
}}}
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/276#comment:4>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets