develooper Front page | perl.perl5.porters | Postings from May 2013

Re: [perl #118055] miniperl fails with SIGBUS on sparc (usethreads+use64bitint)

Thread Previous | Thread Next
From:
Leon Timmermans
Date:
May 20, 2013 03:12
Subject:
Re: [perl #118055] miniperl fails with SIGBUS on sparc (usethreads+use64bitint)
Message ID:
CAHhgV8ggmtMtOMQZ=7zWHYCOjMets8O7PKJH5KncpG113zUXgg@mail.gmail.com
On Sun, May 19, 2013 at 9:50 PM, Niko Tyni <perlbug-followup@perl.org> wrote:
> [ Sorry about the timing, it took a week for our sparc build server to get
>   round to building 5.18.0-RC1, and we got the result just hours after
>   the 5.18.0 release. ]
>
>
> 5.18.0 build fails on sparc with -Dusethreads -Duse64bitint.
> miniperl gets a SIGBUS with just about any non-trivial program.
>
>   ./miniperl -w -Ilib -MExporter -e '<?>' || /usr/bin/make minitest
>   ./miniperl -Ilib make_patchnum.pl
>   make[1]: *** [lib/Config_git.pl] Bus error
>
> An example backtrace:
>   Starting program: /home/ntyni/perl/miniperl -e s/a/b/
>   [Thread debugging using libthread_db enabled]
>   Using host libthread_db library "/lib/sparc-linux-gnu/libthread_db.so.1".
>
>   Program received signal SIGBUS, Bus error.
>   0x0002ffcc in Perl_newPMOP (my_perl=0x26e008, type=33, flags=0) at op.c:4458
>   4458        pmop->op_pmoffset = av_len(PL_regex_padav);
>   (gdb) bt
>   #0  0x0002ffcc in Perl_newPMOP (my_perl=0x26e008, type=33, flags=0) at op.c:4458
>   #1  0x0008c56c in S_scan_subst (my_perl=0x26e008, start=0x28c8f1 "/a/b/\n") at toke.c:9650
>   #2  0x0008421c in Perl_yylex (my_perl=0x26e008) at toke.c:8353
>   #3  0x000957e8 in Perl_yyparse (my_perl=0x26e008, gramtype=258) at perly.c:341
>   #4  0x00018294 in S_parse_body (my_perl=0x26e008, env=0x0, xsinit=0x4cfa4 <xs_init>) at perl.c:2309
>   #5  0x00016d94 in perl_parse (my_perl=0x26e008, xsinit=0x4cfa4 <xs_init>, argc=3, argv=0xffffdd04,
>       env=0x0) at perl.c:1626
>   #6  0x0004ce68 in main (argc=3, argv=0xffffdd04, env=0xffffdd14) at miniperlmain.c:111

This smells like an alignment issue.

> Bisecting says the first bad commit is
>
> commit 8be227ab5eaa23f2d21fd15f70190e494496dcbe
> Author: Father Chrysostomos <sprout@cpan.org>
> Date:   Sat Jun 23 09:54:31 2012 -0700
>
>     CV-based slab allocation for ops

That makes perfect sense with my theory. Probably that allocator
should do some padding to 64-bit boundaries.

Leon

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About