# New Ticket Created by  "jason switzer" 
# Please include the string:  [perl #56712]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=56712 >


When trying to use the --optimize flag, building perl6 causes parrot to
segfault. Attached is the Configure.pl script output. Below is a backtrace
by manually performing the make step from gdb. You'll notice the second run
performs the same operation with the -G option to disable memory management.
Seperate executions have generated slightly different backtraces (likely due
to signal timings). This is not caused by the --inline Configure.pl option.


[EMAIL PROTECTED] ~/Projects/parrot $ gdb ./parrot
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu"...
(gdb) r /home/s1n/Projects/parrot/compilers/nqp/nqp.pbc
--output=languages/perl6/src/gen_actions.pir --encoding=fixed_8 --target=pir
languages/perl6/src/parser/actions.pm
Starting program: /home/s1n/Projects/parrot/parrot
/home/s1n/Projects/parrot/compilers/nqp/nqp.pbc
--output=languages/perl6/src/gen_actions.pir --encoding=fixed_8 --target=pir
languages/perl6/src/parser/actions.pm
[Thread debugging using libthread_db enabled]
warning: Lowest section in /usr/lib64/libicudata.so.38 is .hash at
0000000000000190
[New Thread 0x2af629b5bd00 (LWP 32162)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x2af629b5bd00 (LWP 32162)]
0x00002af623ea64de in Parrot_ResizablePMCArray_set_pmc_keyed_int
(interp=0x60a610, pmc=0x1144d20,
    key=6, src=0x1144ce8) at ./src/pmc/resizablepmcarray.pmc:245
245            data[key] = src;
(gdb) bt
#0  0x00002af623ea64de in Parrot_ResizablePMCArray_set_pmc_keyed_int
(interp=0x60a610,
    pmc=0x1144d20, key=6, src=0x1144ce8) at
./src/pmc/resizablepmcarray.pmc:245
#1  0x00002af623e7d30a in Parrot_Class_instantiate (interp=0x60a610,
pmc=0x9d9370, init=0x65df50)
    at ./src/pmc/class.pmc:337
#2  0x00002af623d3f4b0 in Parrot_new_p_s (cur_opcode=0x2aaaaac31640,
interp=0x60a610)
    at src/ops/pmc.ops:90
#3  0x00002af623dbbc9c in runops_slow_core (interp=0x60a610,
pc=0x2aaaaac31640)
    at src/runops_cores.c:221
#4  0x00002af623d8cbe1 in runops_int (interp=0x60a610, offset=3280) at
src/interpreter.c:918
#5  0x00002af623d8d47d in runops (interp=0x60a610, offs=<value optimized
out>) at src/inter_run.c:106
#6  0x00002af623d8d6d0 in runops_args (interp=0x60a610, sub=<value optimized
out>,
    obj=<value optimized out>, meth_unused=<value optimized out>,
sig=0x2af623ee10c4 "vP",
    ap=0x7fff87116c40) at src/inter_run.c:232
#7  0x00002af623d8de2b in Parrot_runops_fromc_args (interp=0x60a610,
sub=0x1144d20,
    sig=0x4 <Address 0x4 out of bounds>) at src/inter_run.c:301
#8  0x00002af623ec69e2 in imcc_run (interp=0x60a610, sourcefile=<value
optimized out>, argc=5,
    argv=0x7fff87116e90) at compilers/imcc/main.c:782
#9  0x0000000000400c42 in main (argc=5, argv=0x7fff87116e90) at
src/main.c:61
(gdb) r -G /home/s1n/Projects/parrot/compilers/nqp/nqp.pbc
--output=languages/perl6/src/gen_actions.pir --encoding=fixed_8 --target=pir
languages/perl6/src/parser/actions.pm
The program being debugged has been started already.
Start it from the beginning? (y or n) y

Starting program: /home/s1n/Projects/parrot/parrot -G
/home/s1n/Projects/parrot/compilers/nqp/nqp.pbc
--output=languages/perl6/src/gen_actions.pir --encoding=fixed_8 --target=pir
languages/perl6/src/parser/actions.pm
[Thread debugging using libthread_db enabled]
warning: Lowest section in /usr/lib64/libicudata.so.38 is .hash at
0000000000000190

Program exited normally.
Parrot Version 0.6.3 Configure 2.0
Copyright (C) 2001-2008, The Perl Foundation.

Hello, I'm Configure. My job is to poke and prod your system to figure out
how to build Parrot. The process is completely automated, unless you passed in
the `--ask' flag on the command line, in which case I'll prompt you for a few
pieces of info.

Since you're running this program, you obviously have Perl 5--I'll be pulling
some defaults from its configuration.

Checking MANIFEST.....................................................done.
Setting up Configure's default values.................................done.
Setting up installation paths.........................................done.
Tweaking settings for miniparrot...................................skipped.
Loading platform and local hints files................................done.
Finding header files distributed with Parrot..........................done.
Determining what C compiler and linker to use.........................done.
Determining whether make is installed..................................yes.
Determining whether lex is installed...............................skipped.
Determining whether yacc is installed..............................skipped.
Determining if your C compiler is actually gcc.........................yes.
Seeing if GNU libc is installed........................................yes.
Determining whether libc has the backtrace* functions..................yes.
Determining Fink location on Darwin................................skipped.
Determining Macports location on Darwin............................skipped.
Determining if your C compiler is actually Visual C++...................no.
Detecting compiler attributes (-DHASATTRIBUTE_xxx)....................done.
Detecting supported compiler warnings (-Wxxx)..................set for gcc.
Enabling optimization..................................................yes.
Determining flags for building shared libraries......................-fPIC.
Determine if parrot should be linked against a shared library..........yes.
Determining what charset files should be compiled in..................done.
Determining what encoding files should be compiled in.................done.
Determining what types Parrot should use..............................done.
Determining what opcode files should be compiled in...................done.
Determining what pmc files should be compiled in......................done.
Determining your minimum pointer alignment......................... 1 byte.
Probing for C headers.................................................done.
Determining some sizes................................................done.
Computing native byteorder for Parrot's wordsize.............little-endian.
Test the type of va_ptr (this test is likely to segfault).........register.
Figuring out how to pack() Parrot's types.............................done.
Figuring out what formats should be used for sprintf..................done.
Determining if your C library has a working S_ISREG....................yes.
Determining CPU architecture and OS...................................done.
Determining JIT capability..............................................no.
Generating CPU specific stuff.........................................done.
Verifying that the compiler supports function pointer casts...........done.
Determining whether your compiler supports computed goto...............yes.
Determining if your compiler supports inline...........................yes.
Determining what allocator to use.....................................done.
Determining if your C library supports memalign........................yes.
Determining some signal stuff.........................................done.
Determining whether there is socklen_t.................................yes.
Determining if your C library has setenv / unsetenv...................both.
Determining if your platform supports AIO..............................yes.
Determining if your platform supports GMP..............................yes.
Determining if your platform supports readline.........................yes.
Determining if your platform supports gdbm.............................yes.
Determining if your platform supports pcre........................yes, 7.7.
Determining if your platform supports OpenGL...............yes, freeglut 4.
Determining if your platform supports crypto...................yes, 0.9.8h.
Seeing if your configuration includes gettext..........................yes.
Testing snprintf......................................................done.
Determining whether perldoc is installed...............................yes.
Determining whether (exuberant) ctags is installed.....................yes.
Determining Parrot's revision.......................................r29180.
Determining whether ICU is installed...................................yes.
Generating C headers..................................................done.
Generating core pmc list..............................................done.
Generating Digest PMC files...........................................done.
Generating runtime/parrot/include.....................................done.
Generating OpenGL bindings...In OpenGL header '/usr/include/GL/glxew.h', prototype 'glXCopyContext', can't handle type 'GLulong'; original prototype:
  extern void glXCopyContext (Display *dpy, GLXContext src, GLXContext dst, GLulong mask);

.........................................done.
Generating NCI signature list.........................................done.
Configuring languages.................................................done.
Generating makefiles and other build files............................done.
Moving platform files into place......................................done.
Recording configuration data for later retrieval......................done.
Okay, we're done!

You can now use `gmake' to build your Parrot.
After that, you can use `gmake test' to run the test suite.

Happy Hacking,
        The Parrot Team

Reply via email to