From: Nicholas Clark Date: Sun, 26 May 2013 06:50:17 +0000 (+0200) Subject: Improved struct pmop alignment fix - avoid the slow path on 64 bit systems. X-Git-Tag: upstream/5.20.0~3028 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0f5bd29fb92492cf7c78ec3195f10abc5c741816;p=platform%2Fupstream%2Fperl.git Improved struct pmop alignment fix - avoid the slow path on 64 bit systems. Commit c2a50ddb1bed6576 works round an alignment bug in the slab allocator for 32 bit systems built with 64 bit IVs. However, the C pre-processor logic meant that the test path was enabled on true 64 bit systems. It's not needed there, so improve the logic so that it isn't compiled for platforms where pointers are 64 bit. --- diff --git a/op.c b/op.c index f7ecb9a..4276d3c 100644 --- a/op.c +++ b/op.c @@ -175,7 +175,7 @@ Perl_Slab_Alloc(pTHX_ size_t sz) || (CvSTART(PL_compcv) && !CvSLABBED(PL_compcv))) return PerlMemShared_calloc(1, sz); -#if defined(USE_ITHREADS) && IVSIZE > U32SIZE +#if defined(USE_ITHREADS) && IVSIZE > U32SIZE && IVSIZE > PTRSIZE /* Work around a goof with alignment on our part. For sparc32 (and possibly other architectures), if built with -Duse64bitint, the IV op_pmoffset in struct pmop should be 8 byte aligned, but the slab