develooper Front page | perl.perl5.porters | Postings from September 2013

[perl #66584] Devel::Peek fails 2 tests when perl is built with NO_PERL_PRESERVE_IVUV

From:
James E Keenan via RT
Date:
September 6, 2013 23:29
Subject:
[perl #66584] Devel::Peek fails 2 tests when perl is built with NO_PERL_PRESERVE_IVUV
Message ID:
rt-3.6.HEAD-1873-1378510185-469.66584-15-0@perl.org
On Fri Aug 30 22:06:42 2013, Hugmeir wrote:
> On Sun, Dec 11, 2011 at 3:27 PM, James E Keenan via RT <
> perlbug-followup@perl.org> wrote:
> 
> > On Sun Jun 14 18:20:59 2009, sisyphus1@optusnet.com.au wrote:
> > >
> > > Not sure of the approved way of building perl with
> > > NO_PERL_PRESERVE_IVUV on
> > > Win32.
> > > I simply placed a '#define NO_PERL_PRESERVE_IVUV' at the beginning of
> > > perl.h.
> > >
> > > Tests 21 and 23 of ext/Devel/Peek/t/Peek.t are the only tests that
> > > failed
> > > during the running of the test suite. The output I get for those 2
> > > tests is
> > > given below.
> > >
> > > Not sure if the garbage (for want of a better word) in the "expected"
> > > output
> > > is part of the failure, but I note that the "got" output terminates
> > > with:
> > >
> > > #       REFCNT = 1
> > > #       FLAGS = (IOK,NOK,pIOK,pNOK)
> > > #       IV = 456
> > > #       NV = 456
> > > #       PV = 0
> > >
> > > whereas the "expected" output terminates with:
> > >
> > > #       REFCNT = 1
> > > #       FLAGS = \(IOK,pIOK\)
> > > #       IV = 456\Z)/
> > >
> > > Anyway, here's the full output for those tests:
> > > [snip]
> >
> > It seems to me that there are two, connected issues raised in this
ticket.
> >
> > One is the general problem of how one would build Perl with
> > 'NO_PERL_PRESERVE_IVUV' and the circumstances where one would want to do
> > that.
> >
> > The other is any Win32-specific problem, such as getting tests to pass
> > once we have figured out how to build with this option.
> >
> > For the reference of anyone who can address this ticket, here's some
> > relevant source code:
> >
> > from perl.h:
> > ###
> > #ifndef NO_PERL_PRESERVE_IVUV
> > #define PERL_PRESERVE_IVUV      /* We like our integers to stay
integers.
> > */
> > #endif
> > ###
> >
> > ... and this comments precedes several tests in ext/Devel-Peek/t/Peek.t
> > ###
> > # If perl is built with PERL_PRESERVE_IVUV then maths is done as
integers
> > # where possible and this scalar will be an IV. If NO_PERL_PRESERVE_IVUV
> > then
> > # maths is done in floating point always, and this scalar will be an NV.
> > # ([NI]) captures the type, referred to by \1 in this regexp and
$type for
> > # building subsequent regexps.
> > ###
> >
> > Rob, have you had any further experience with this bug since originally
> > filing the ticket?
> >
> 
> It's possible to reproduce this failure by compiling perl like this:
> ./Configure -des -Dusedevel -Dccflags='-DNO_PERL_PRESERVE_IVUV'
> 
> I imagine that building a perl with that option would give you a different
> performance profile, at the price of getting possibly questionable
behavior.
> Coincidentally, I am in the process of reviewing ifdefs like this, and was
> writing about this and other undocumented symbols, but I'll leave that for
> another mail.
> 
> It's not clear to me if Peek.t should be fixed to accommodate perls built
> like this. In a sense, we're implicitly saying that this is supporting by
> checking if the symbol is defined. But on the other hand, we could treat
> this like NO_TAINT_SUPPORT -- the option is there, but we don't guarantee
> that the resulting perl will be equally functional.

Since there has been additional discussion within the 7-day timespan, I
will not close this ticket.

Thank you very much.
Jim Keenan


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=66584



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About