On Sat Jun 22 14:33:02 2013, nicholas wrote: > On Sat, Jun 22, 2013 at 10:22:57PM +0100, Nicholas Clark wrote: > > On Sat, Jun 22, 2013 at 02:20:26PM -0700, Father Chrysostomos via RT > wrote: > > > On Sat Jun 22 13:10:53 2013, nicholas wrote: > > > > > > --- a/sv.h > > > > +++ b/sv.h > > > > @@ -531,7 +531,7 @@ struct xpvgv { > > > > union _xnvu xnv_u; > > > > }; > > > > > > > > -typedef U16 cv_flags_t; > > > > +typedef U32 cv_flags_t; > > > > > > > > #define _XPVCV_COMMON \ > > > > HV * xcv_stash; \ > > > > > > Yes, that is it. > > > > I've bisected on a big endian linux machine I have access to, and > that's it. > > Running tests on a fix... > > Try this: > > commit 13d58115f07b12133a2df2821b893f0fc20065d9 > Author: Nicholas Clark <nick@ccl4.org> > Date: Sat Jun 22 14:25:26 2013 -0700 > > Update B's size/offset for CvFLAGS to U32, following commit > 51c78f1b91bbcd7a. > > B.xs contains a table of offsets and sizes for members of the > various SV > structures. This needs updating as 51c78f1b91bbcd7a changed > CvFLAGS from > U16 to U32. This ommision won't be noticed on little endian > platforms, but on > big endian platforms B::CV::CvFLAGS will return 0 instead of the > true value. > > diff --git a/ext/B/B.xs b/ext/B/B.xs > index fdeca72..fbe6be6 100644 > --- a/ext/B/B.xs > +++ b/ext/B/B.xs > @@ -1328,7 +1328,7 @@ MODULE = B PACKAGE = B::IV > #define PVCV_file_ix sv_char_pp | offsetof(struct xpvcv, xcv_file) > #define PVCV_outside_ix sv_SVp | offsetof(struct xpvcv, xcv_outside) > #define PVCV_outside_seq_ix sv_U32p | offsetof(struct xpvcv, > xcv_outside_seq) > -#define PVCV_flags_ix sv_U16p | offsetof(struct xpvcv, xcv_flags) > +#define PVCV_flags_ix sv_U32p | offsetof(struct xpvcv, xcv_flags) > > #define PVHV_max_ix sv_STRLENp | offsetof(struct xpvhv, xhv_max) > > > Pushed as origin/smoke-me/nicholas/RT-118603 Wouldn’t a more robust approach like the attached be better? (I have not actually tested my patch.) -- Father Chrysostomos --- via perlbug: queue: perl5 status: open https://rt.perl.org:443/rt3/Ticket/Display.html?id=118603Thread Previous | Thread Next