Ticket #445 (closed bug: fixed)
[bug] Darwin string buffering segfault in examples/shootout/revcomp.pir
Reported by: | allison | Owned by: | mikehh |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | testing | Version: | |
Severity: | medium | Keywords: | |
Cc: | chromatic, allison | Language: | |
Patch status: | Platform: | all |
Description
examples/shootout/revcomp.pir (which is also t/examples/shootout_17.pir) is failing with a segfault on MacOS 10.5.6. I would assume that this is just a broken XCode install on this machine, but it appears that jkeenan was failing the same test in TT #438. So, I'm skipping this test on darwin for now. You can duplicate the failure with:
./parrot examples/shootout/revcomp.pir < examples/shootout/revcomp.pir_input
gcc installed with XCode 3.0 gives the following error:
Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x002df3bc 0xffff07c2 in ___memcpy () at /System/Library/Frameworks/System.framework/PrivateHeaders/i386/cpu_capabilities.h:246 246 /System/Library/Frameworks/System.framework/PrivateHeaders/i386/cpu_capabilities.h: No such file or directory. in /System/Library/Frameworks/System.framework/PrivateHeaders/i386/cpu_capabilities.h (gdb) bt #0 0xffff07c2 in ___memcpy () at /System/Library/Frameworks/System.framework/PrivateHeaders/i386/cpu_capabilities.h:246 #1 0x007ad57b in Parrot_io_write_buffer (interp=0xd01760, filehandle=0x2a9008, s=0x2ce17c) at src/io/buffer.c:638 #2 0x008723a1 in Parrot_FileHandle_nci_puts (interp=0xd01760, pmc=0x1e8a0) at filehandle.pmc:518 #3 0x007e540a in Parrot_NCI_invoke (interp=0xd01760, pmc=0x1e8a0, next=0x0) at nci.pmc:330 #4 0x006c5c0d in Parrot_PCCINVOKE (interp=0xd01760, pmc=0x2a9008, method_name=0x1006e18, signature=0x9355fc "S->I") at src/call/pcc.c:2848 #5 0x007ab1c9 in Parrot_io_putps (interp=0xd01760, pmc=0x2a9008, s=0x2ce17c) at src/io/api.c:458 #6 0x0064b19e in Parrot_print_s (cur_opcode=0x104d468, interp=0xd01760) at io.ops:194 #7 0x00716464 in runops_slow_core (interp=0xd01760, pc=0x104d468) at src/runops_cores.c:461 #8 0x006c9726 in runops_int (interp=0xd01760, offset=39) at src/interpreter.c:980 #9 0x006ca1b0 in runops (interp=0xd01760, offs=39) at src/call/ops.c:107 #10 0x006ca469 in runops_args (interp=0xd01760, sub=0x2a8ba0, obj=0x103a2b0, meth_unused=0x0, sig=0x930ab4 "vP", ap=0xbfffecac "p�*") at src/call/ops.c:254 #11 0x006cb2ba in Parrot_runops_fromc_args (interp=0xd01760, sub=0x2a8ba0, sig=0x930ab4 "vP") at src/call/ops.c:321 #12 0x006a764e in Parrot_runcode (interp=0xd01760, argc=1, argv=0xbfffedc0) at src/embed.c:1011
On some research, the missing cpu_capabilities.h appears to be a problem with an (incompletely or badly) upgraded XCode install. Upgrading to XCode 3.1.2 changes the error in gdb to a more obscure and less useful:
Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x002df3f8 0xffff07c2 in ?? () (gdb) bt #0 0xffff07c2 in ?? () #1 0xbfffea68 in ?? ()
Creating a ticket to refer to in the skip.