# New Ticket Created by Jarkko Hietaniemi # Please include the string: [perl #41249] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41249 >
--- osname= dec_osf osvers= 5.1a arch= alpha-dec_osf-thread-multi cc= cc V6.4-014 --- Flags: category=core severity=high ack=no --- kosh:/tmp/jhi/parrot ; dbx ./parrot dbx version 5.1 Type 'help' for help.main: 510 Parrot_set_config_hash(); (dbx) run t/op/interp_3.pir thread 0x3 signal Segmentation fault at warning: "src/ops/io.ops":223 has no code associated with it [Parrot_print_sc warning: "src/ops/io.ops":223 has no code associated with it :223 +0x2013e309,0x12013e308] STRING * const s = $1; (dbx) where > 0 Parrot_print_sc(cur_opcode = 0x140486538, interp = 0x1404cd400) > ["src/ops/io.ops":223, 0x12013e308] 1 runops_slow_core(interp = 0x1404cd400, pc = 0x140486538) ["src/runops_cores.c":184, 0x1201bdbf8] 2 runops_int( = 0x1404cd400, = 0x1404cd400, interp = 0x1404cd400, offset = 31) ["src/interpreter.c":775, 0x120167458] 3 runops(interp = 0x1404cd400, offs = 31) ["src/inter_run.c":87, 0x1201656c0] 4 Parrot_runinterp_p_ic(cur_opcode = 0x140486490, interp = 0x140166000) ["src/ops/core.ops":1010, 0x120133130] 5 runops_slow_core(interp = 0x140166000, pc = 0x140486490) ["src/runops_cores.c":184, 0x1201bdbf8] 6 runops_int( = 0x140166000, = 0x140166000, interp = 0x140166000, offset = 0) ["src/interpreter.c":775, 0x120167458] 7 runops(interp = 0x140166000, offs = 0) ["src/inter_run.c":87, 0x1201656c0] 8 runops_args(interp = 0x140166000, sub = 0x14048e998, obj = 0x1400c34c0, meth = (nil), sig = 0x14009c7a8 = "vP", ap = struct { _a0 = 0x11fffbf20 _offset = 24}) ["src/inter_run.c":193, 0x1201659f0] 9 Parrot_runops_fromc_args(interp = 0x140166000, sub = 0x14048e998, sig = 0x14009c7a8 = "vP") ["src/inter_run.c":295, 0x120165bc0] 10 Parrot_runcode(interp = 0x140166000, argc = 1, argv = 0x11fffc020) ["src/embed.c":805, 0x12010edc4] 11 main(argc = 1, argv = 0x11fffc020) ["compilers/imcc/main.c":721, 0x1200edd50](dbx) (dbx) The line 223 in src/ops/base_ops.c (Parrot_print_sc()) expands to STRING * const s = ( ( interp -> ctx ) . state ) -> constants [ cur_opcode [ 1 ] ] ->u.string; The segmentation fault comes from the ->constants being NULL: (dbx) p *((interp->ctx).state) struct { caller_ctx = (nil) bp = union { regs_n = 0x1404cfec0 regs_i = 0x1404cfec0 } bp_ps = union { regs_p = 0x1404d00c0 regs_s = 0x1404d00c0 } n_regs_used = 0x1400129e0 regs_mem_size = 1024 ref_count = 0 reg_stack = 0x140812bc8 user_stack = 0x140817bf0 lex_pad = 0x1400c34c0 outer_ctx = (nil) warns = 0 errors = 5 trace_flags = 0 recursion_depth = 18446744073709551615 current_sub = (nil) current_cont = (nil) current_object = (nil) current_method = (nil) current_pc = 0x140486538 current_namespace = 0x14053f7b0 current_HLL = 0 current_results = (nil) constants = (nil) pred_offset = 0 } (dbx) So it would seem running an interpreter from within an interpreter (that's what the interp_3.pir seems to be doing) isn't correctly copying/initializing a lot of stuff in the child interpreter? --- Summary of my parrot 0.4.7 (r0) configuration: configdate='Fri Jan 12 03:51:38 2007' Platform: osname=dec_osf, archname=alpha-dec_osf jitcapable=0, jitarchname=nojit, jitosname=dec_osf, jitcpuarch=alpha execcapable=0 perl=/u/vieraat/vieraat/jhi/Perl/Platform/OSF1/bin/perl Compiler: cc='cc', ccflags='-std -D_INTRINSICS -fprm d -ieee -I/p/include -DLANGUAGE_C -pthread -D_XOPEN_SOURCE=500', Linker and Libraries: ld='ld', ldflags=' -L/p/lib', cc_ldflags='', libs='-lm -lutil -lpthread -laio -lrt -lgmp' Dynamic Linking: share_ext='.so', ld_share_flags='-shared -expect_unresolved "*" -O4 -msym -std -L/p/lib', load_ext='.so', ld_load_flags='-shared -expect_unresolved "*" -O4 -msym -std -L/p/lib' Types: iv=long, intvalsize=8, intsize=4, opcode_t=long, opcode_t_size=8, ptrsize=8, ptr_alignment=8 byteorder=12345678, nv=double, numvalsize=8, doublesize=8 --- Environment: HOME LANG LANGUAGE LC_ALL LC_CTYPE LD_LIBRARY_PATH LOGDIR PATH SHELL