develooper Front page | perl.perl5.porters | Postings from November 2008

Re: [perl #60574] sv_upgrade() loses 64-bit alignment, causing SIGBUS on sparc

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
November 17, 2008 07:44
Subject:
Re: [perl #60574] sv_upgrade() loses 64-bit alignment, causing SIGBUS on sparc
Message ID:
20081117154418.GW49335@plum.flirble.org
On Sun, Nov 16, 2008 at 08:17:17PM +0200, Niko Tyni wrote:
> On Sun, Nov 16, 2008 at 05:15:36PM +0000, Nicholas Clark wrote:
> > On Sun, Nov 16, 2008 at 04:16:14AM -0800, Niko Tyni wrote:
> > 
> > > As seen in <http://bugs.debian.org/505415>, calling sv_chop() or otherwise
> > > upgrading an SV can result in an unaligned 64-bit access on the sparc
> > > architecture.
> 
> > What is __alignof__(XPVIV) and sizeof(XPVIV) on the same system?
> 
> 8 and 24.

whereas __alignof__(xpv_allocated) and sizeof(xpv_allocated) are 8 and 4,
and __alignof__(xpviv_allocated) and sizeof(xpviv_allocated) are 12 and 4?

If so, that would explain a lot, and it's my fault.

> > I see that -fno-strict-aliasing is on. That might prove relevant in my reply
> > to your reply.
> 
> I didn't explicitly ask for it, so it would seem to be on by default.

It is Perl's default for gcc. I think it may not be relevant now.
I have an idea what is up, and some idea of how to fix it.

Nicholas Clark

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