develooper Front page | perl.perl5.porters | Postings from February 2012

Re: Possible misalign problem in HvKEYS (HV *)

Thread Previous | Thread Next
From:
Tony Cook
Date:
February 29, 2012 01:22
Subject:
Re: Possible misalign problem in HvKEYS (HV *)
Message ID:
20120229092246.GA433@mars.tony.develop-help.com
On Wed, Feb 29, 2012 at 08:32:20AM +0100, H.Merijn Brand wrote:
> Ping. Nobody vented any opinion. Do we (have to) care?
> 
> On Fri, 3 Feb 2012 11:46:15 +0100, "H.Merijn Brand"
> <h.m.brand@xs4all.nl> wrote:
> 
> > HP-UX 11.31/64 U  rx2660/64 Itanium 2 9100/1710(2) ia64
> > "DBI.xs", line 1469: warning #4232-D: conversion from "XPVHV *" to a more
> >           strictly aligned type "XPVMG *" may cause misaligned access
> >               PerlIO_printf(DBILOGFP,"%s CachedKids %d\n", pad, (int)HvKEYS(> > 
> > perl-5.14.2 > perl Porting/expand-macro.pl HvKEYS
> > `sh  cflags "optimize='+O2 +Onolimit'" try.c` -E try.c > try.i
> >           CCCMD =  cc -DPERL_CORE -c  -Ae -DPERL_DONT_CREATE_GVSV +Z -z -D_HPUX_SOURCE -Wl,+vnocompatwarnings +DD64 -I/pro/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64   +O2 +Onolimit
> > #line 4 "HvKEYS expands to"
> > ((((XPVHV*) (A0)->sv_any)->xhv_keys) - (((XPVMG*) (A0)->sv_any)->xmg_u . xmg_magic ? Perl_hv_placeholders_get( (const HV *)A0) : 0))

As long as sv_any actually contains a XPVMG * it should be safe
enough.

Tony

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