Subject: | Segfault with clang -O2 |
I'm using perlbrew with clang compiler and perl 5.14.2. Using the
default build options causes Devel::Declare to segfault.
Setting "OPTIMIZE = -O0" in the Makefile works fine.
$ clang -v
Debian clang version 3.0-5 (tags/RELEASE_30/final) (based on LLVM 3.0)
Target: x86_64-pc-linux-gnu
Thread model: posix
Relevant test output:
Failed 2/2 subtests
Signal SEGV at /home/ioan/perl5/perlbrew/perls/perl-
5.14.2/lib/5.14.2/perl5db.pl line 7684.
DB::diesignal('SEGV') called at t/debug.pl line 29
eval {...} called at t/debug.pl line 29
t/filter1.t ....................
gdb (Devel::Declare compiled with with -g)
(gdb) run
Starting program: /home/ioan/perl5/perlbrew/perls/perl-5.14.2/bin/perl -
Iblib/lib t/debug.pl
[Thread debugging using libthread_db enabled]
Program received signal SIGSEGV, Segmentation fault.
0x000000000043ed5b in Perl_filter_read ()
(gdb) bt
#0 0x000000000043ed5b in Perl_filter_read ()
#1 0x00007ffff6480810 in dd_filter_realloc (my_perl=<optimized out>,
idx=<optimized out>, sv=0x783d28, maxlen=0)
at /home/ioan/Downloads/Devel-Declare-0.006010/Declare.xs:403
#2 0x000000000043dd75 in Perl_lex_next_chunk ()
#3 0x000000000044314c in Perl_yylex ()
#4 0x000000000045bc44 in Perl_yyparse ()
#5 0x0000000000433a97 in perl_parse ()
#6 0x000000000041cad0 in main ()