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

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

Thread Previous | Thread Next
From:
Niko Tyni
Date:
November 18, 2008 05:03
Subject:
Re: [perl #60574] sv_upgrade() loses 64-bit alignment, causingSIGBUS on sparc
Message ID:
20081117185228.GA4134@rebekka
On Mon, Nov 17, 2008 at 03:44:18PM +0000, Nicholas Clark wrote:
> 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?

The other way around, otherwise right.

XPV:             alignof: 8 sizeof: 16
xpv_allocated:   alignof: 4 sizeof: 8
XPVIV:           alignof: 8 sizeof: 24
xpviv_allocated: alignof: 4 sizeof: 12
 
> If so, that would explain a lot, and it's my fault.

Looking forward to the explanation :)

Thanks for your work,
-- 
Niko Tyni   ntyni@debian.org

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