Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devel::Peek fails 2 tests when perl is built with NO_PERL_PRESERVE_IVUV #9766

Closed
p5pRT opened this issue Jun 15, 2009 · 10 comments
Closed

Devel::Peek fails 2 tests when perl is built with NO_PERL_PRESERVE_IVUV #9766

p5pRT opened this issue Jun 15, 2009 · 10 comments

Comments

@p5pRT
Copy link

p5pRT commented Jun 15, 2009

Migrated from rt.perl.org#66584 (status was 'open')

Searchable as RT66584$

@p5pRT
Copy link
Author

p5pRT commented Jun 15, 2009

From @sisyphus

Created by Rob@desktop2

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​:

#############################################
ok 20
not ok 21
# Failed at ../ext/Devel/Peek/t/Peek.t line 72
# got 'SV = RV(0x2792da8) at 0x2792d9c
# REFCNT = 1
# FLAGS = (ROK)
# RV = 0x308c24
# SV = PVAV(0x309bcc) at 0x308c24
# REFCNT = 1
# FLAGS = ()
# ARRAY = 0x4f6f3c
# FILL = 1
# MAX = 1
# ARYLEN = 0x0
# FLAGS = (REAL)
# Elt No. 0
# SV = IV(0x2792be8) at 0x2792bec
# REFCNT = 1
# FLAGS = (IOK,pIOK)
# IV = 123
# Elt No. 1
# SV = PVNV(0x4dd4f4) at 0x308c34
# REFCNT = 1
# FLAGS = (IOK,NOK,pIOK,pNOK)
# IV = 456
# NV = 456
# PV = 0
# '
# expected /(?ms-xi​:\A(?​:ALLOCATED at .*?
# )?SV = RV\(0x[[​:xdigit​:]]+\) at 0x[[​:xdigit​:]]+
# REFCNT = 1
# FLAGS = \(ROK\)
# RV = 0x[[​:xdigit​:]]+
# (?​: ALLOCATED at .*?
# )? SV = PVAV\(0x[[​:xdigit​:]]+\) at 0x[[​:xdigit​:]]+
# REFCNT = 1
# FLAGS = \(\)
# ARRAY = 0x[[​:xdigit​:]]+
# FILL = 1
# MAX = 1
# ARYLEN = 0x0
# FLAGS = \(REAL\)
# Elt No. 0
# (?​: ALLOCATED at .*?
# )? SV = IV\(0x[[​:xdigit​:]]+\) at 0x[[​:xdigit​:]]+
# REFCNT = 1
# FLAGS = \(IOK,pIOK\)
# IV = 123
# Elt No. 1
# (?​: ALLOCATED at .*?
# )? SV = IV\(0x[[​:xdigit​:]]+\) at 0x[[​:xdigit​:]]+
# REFCNT = 1
# FLAGS = \(IOK,pIOK\)
# IV = 456\Z)/
ok 22
not ok 23
# Failed at ../ext/Devel/Peek/t/Peek.t line 72
# got 'SV = RV(0x2792bf8) at 0x2792bec
# REFCNT = 1
# FLAGS = (ROK)
# RV = 0x2792d9c
# SV = PVHV(0x4250c8) at 0x2792d9c
# REFCNT = 1
# FLAGS = (SHAREKEYS)
# ARRAY = 0x43ccbc (0​:7, 1​:1)
# hash quality = 100.0%
# KEYS = 1
# FILL = 1
# MAX = 7
# RITER = -1
# EITER = 0x0
# Elt "123" HASH = 0x29b8dfb0
# SV = PVNV(0x4dd4f4) at 0x308c24
# REFCNT = 1
# FLAGS = (IOK,NOK,pIOK,pNOK)
# IV = 456
# NV = 456
# PV = 0
# '
# expected /(?ms-xi​:\A(?​:ALLOCATED at .*?
# )?SV = RV\(0x[[​:xdigit​:]]+\) at 0x[[​:xdigit​:]]+
# REFCNT = 1
# FLAGS = \(ROK\)
# RV = 0x[[​:xdigit​:]]+
# (?​: ALLOCATED at .*?
# )? SV = PVHV\(0x[[​:xdigit​:]]+\) at 0x[[​:xdigit​:]]+
# REFCNT = 1
# FLAGS = \(SHAREKEYS\)
# ARRAY = 0x[[​:xdigit​:]]+ \(0​:7, 1​:1\)
# hash quality = 100.0%
# KEYS = 1
# FILL = 1
# MAX = 7
# RITER = -1
# EITER = 0x0
# Elt "123" HASH = 0x[[​:xdigit​:]]+
# (?​: ALLOCATED at .*?
# )? SV = IV\(0x[[​:xdigit​:]]+\) at 0x[[​:xdigit​:]]+
# REFCNT = 1
# FLAGS = \(IOK,pIOK\)
# IV = 456\Z)/
#############################################

Same results with a recent (though not latest) build of blead.

Cheers,
Rob

Perl Info

Flags:
    category=library
    severity=medium

Site configuration information for perl 5.10.0:

Configured by Rob at Sat Jun 13 10:47:53 2009.

Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
  Platform:
    osname=MSWin32, osvers=6.0, archname=MSWin32-x64-multi-thread
    uname=''
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags 
' -s -O2 -DWIN32 -DHAVE_DES_FCRYPT  -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS 
 -fno-strict-aliasing -DPERL_MSVCRT_READFIX',
    optimize='-s -O2',
    cppflags='-DWIN32'
    ccversion='', gccversion='3.4.5', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='long long', 
lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='g++', ldflags 
='-s -L"c:\perl510_NV\5.10.0\lib\CORE" -L"C:\home\rob\mingw_vista\i686-pc-mingw32\lib"'
    libpth=C:\home\rob\mingw_vista\i686-pc-mingw32\lib
    libs=-lmsvcrt -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 
 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm 
 -lversion -lodbc32 -lodbccp32
    perllibs=-lmsvcrt -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 
 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm 
 -lversion -lodbc32 -lodbccp32
    libc=-lmsvcrt, so=dll, useshrplib=true, libperl=libperl510.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', 
lddlflags='-mdll -s -L"c:\perl510_NV\5.10.0\lib\CORE" -L"C:\home\rob\mingw_vista\i686-pc-mingw32\lib"'

Locally applied patches:



@INC for perl 5.10.0:
    C:/perl510_NV/5.10.0/lib
    C:/perl510_NV/site/5.10.0/lib
    .


Environment for perl 5.10.0:
    HOME (unset)
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=C:\perl510_NV\5.10.0\bin;c:\ruby\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\batch
    PERL_BADLANG (unset)
    SHELL (unset)


@p5pRT
Copy link
Author

p5pRT commented Jun 17, 2009

From @sisyphus

----- Original Message -----
From​: "Sisyphus (via RT)" <perlbug-followup@​perl.org>

Same results with a recent (though not latest) build of blead.

Ooops - that could be taken to mean that the problem is fixed in the latest
blead, but that's not what I meant.
I haven't checked using the latest blead. I have checked using only a recent
(~6 weeks old version of blead) and the failure was still present in that
blead build.

Cheers,
Rob

@p5pRT
Copy link
Author

p5pRT commented Dec 11, 2011

From @jkeenan

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?

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented Dec 11, 2011

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Aug 31, 2013

From @jkeenan

There has been no further discussion in this ticket since I last posted
twenty months ago.

I am taking the ticket for the purpose of closing it within 7 days
unless there is further discussion.

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented Aug 31, 2013

From @Hugmeir

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.

@p5pRT
Copy link
Author

p5pRT commented Sep 6, 2013

From @jkeenan

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

Thank you very much.
Jim Keenan

@toddr
Copy link
Member

toddr commented Feb 13, 2020

@Hugmeir did you find anything?

@jkeenan
Copy link
Contributor

jkeenan commented Apr 8, 2020

@Hugmeir did you find anything?

This ticket was filed years ago from a Windows machine. I do not have Windows available. However, I compiled blead just now on Linux with the config options suggested by @Hugmeir.

./Configure -des -Dusedevel -Dccflags='-DNO_PERL_PRESERVE_IVUV'

Devel-Peek PASSed its tests and was installed.

Does that make this ticket closable (again)?

@jkeenan jkeenan added the Closable? We might be able to close this ticket, but we need to check with the reporter label Apr 8, 2020
@toddr
Copy link
Member

toddr commented Apr 8, 2020

I vote yes.

@toddr toddr closed this as completed Apr 8, 2020
@toddr toddr removed the Closable? We might be able to close this ticket, but we need to check with the reporter label Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants