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

old hash behaviour test fails, op/each.t ../ext/Devel-Peek/t/Peek.t #12959

Closed
p5pRT opened this issue May 11, 2013 · 9 comments
Closed

old hash behaviour test fails, op/each.t ../ext/Devel-Peek/t/Peek.t #12959

p5pRT opened this issue May 11, 2013 · 9 comments

Comments

@p5pRT
Copy link

p5pRT commented May 11, 2013

Migrated from rt.perl.org#117963 (status was 'rejected')

Searchable as RT117963$

@p5pRT
Copy link
Author

p5pRT commented May 11, 2013

From @bulk88

Created by @bulk88

Turning on pre 5.18 has behaviour with a modified hv_func.h as such
______________________________________________________________
/* hash a key
*--------------------------------------------------------------------------------------
* The "hash seed" feature was added in Perl 5.8.1 to perturb the results
* to avoid "algorithmic complexity attacks".
*
* If USE_HASH_SEED is defined, hash randomisation is done by default
* If USE_HASH_SEED_EXPLICIT is defined, hash randomisation is done
* only if the environment variable PERL_HASH_SEED is set.
* (see also perl.c​:perl_parse() and S_init_tls_and_interp() and
util.c​:get_hash_seed())
*/

#ifndef PERL_SEEN_HV_FUNC_H /* compile once */
#define PERL_SEEN_HV_FUNC_H

#define PERL_HASH_FUNC_ONE_AT_A_TIME_OLD
#undef USE_HASH_SEED
#undef USE_HASH_SEED_EXPLICIT
______________________________________________________________

is causing the following unusual test failures on my machine. 32 bit
Windows XP.

______________________________________________________________
C​:\p518src\perl-05f5908\t>..\perl.exe -I..\lib harness op/each.t
op/each.t .. # Failed test 58 - each() after insert produces warnings at
op/each
.t line 282
op/each.t .. Failed 1/59 subtests

Test Summary Report
-------------------
op/each.t (Wstat​: 0 Tests​: 59 Failed​: 1)
  Failed test​: 58
Files=1, Tests=59, 1 wallclock secs ( 0.01 usr + 0.01 sys = 0.03 CPU)
Result​: FAIL

C​:\p518src\perl-05f5908\t>..\perl.exe -I..\lib harness
../ext/Devel-Peek/t/Peek.t
../ext/Devel-Peek/t/Peek.t .. 1/?
# Failed test 'ENAME on a stash'
# at t/Peek.t line 80.
# 'SV = IV(0xa9e030) at 0xa9e034
# REFCNT = 1
# FLAGS = (ROK)
# RV = 0xa65db4
# SV = PVHV(0x8f07d4) at 0xa65db4
# REFCNT = 2
# FLAGS = (OOK,SHAREKEYS)
# ARRAY = 0xa93c4c
# KEYS = 0
# FILL = 0
# MAX = 7
# RITER = -1
# EITER = 0x0
#
# NAME = "RWOM"
# ENAME = "RWOM"
# '
# doesn't match '(?^ms​:\A(?​:ALLOCATED at .*?
# )?SV = IV\(0x[[​:xdigit​:]]+\) at 0x[[​:xdigit​:]]+
# REFCNT = 1
# FLAGS = \(ROK\)
# RV = 0x[[​:xdigit​:]]+
# (?​: ALLOCATED at .*?
# )? SV = PVHV\(0x[[​:xdigit​:]]+\) at 0x[[​:xdigit​:]]+
# REFCNT = 2
# FLAGS = \(OOK,SHAREKEYS\)
# ARRAY = 0x[[​:xdigit​:]]+
# KEYS = 0
# FILL = 0
# MAX = 7
# RITER = -1
# EITER = 0x0
# RAND = 0x[[​:xdigit​:]]+
# NAME = "RWOM"
# ENAME = "RWOM"
# \Z)'

# Failed test 'ENAMEs on a stash'
# at t/Peek.t line 80.
# 'SV = IV(0xa9e030) at 0xa9e034
# REFCNT = 1
# FLAGS = (ROK)
# RV = 0xa65db4
# SV = PVHV(0x8f07d4) at 0xa65db4
# REFCNT = 3
# FLAGS = (OOK,SHAREKEYS)
# ARRAY = 0xa93c4c
# KEYS = 0
# FILL = 0
# MAX = 7
# RITER = -1
# EITER = 0x0
#
# NAME = "RWOM"
# NAMECOUNT = 2
# ENAME = "RWOM", "KLANK"
# '
# doesn't match '(?^ms​:\A(?​:ALLOCATED at .*?
# )?SV = IV\(0x[[​:xdigit​:]]+\) at 0x[[​:xdigit​:]]+
# REFCNT = 1
# FLAGS = \(ROK\)
# RV = 0x[[​:xdigit​:]]+
# (?​: ALLOCATED at .*?
# )? SV = PVHV\(0x[[​:xdigit​:]]+\) at 0x[[​:xdigit​:]]+
# REFCNT = 3
# FLAGS = \(OOK,SHAREKEYS\)
# ARRAY = 0x[[​:xdigit​:]]+
# KEYS = 0
# FILL = 0
# MAX = 7
# RITER = -1
# EITER = 0x0
# RAND = 0x[[​:xdigit​:]]+
# NAME = "RWOM"
# NAMECOUNT = 2
# ENAME = "RWOM", "KLANK"
# \Z)'
../ext/Devel-Peek/t/Peek.t .. 58/?
# Failed test 'ENAMEs on a stash with no NAME'
# at t/Peek.t line 80.
# 'SV = IV(0xa9e030) at 0xa9e034
# REFCNT = 1
# FLAGS = (ROK)
# RV = 0xa65db4
# SV = PVHV(0x8f07d4) at 0xa65db4
# REFCNT = 3
# FLAGS = (OOK,OVERLOAD,SHAREKEYS)
# ARRAY = 0xa93c4c
# KEYS = 0
# FILL = 0
# MAX = 7
# RITER = -1
# EITER = 0x0
#
# NAMECOUNT = -3
# ENAME = "RWOM", "KLANK"
# '
# doesn't match '(?^ms​:\A(?​:ALLOCATED at .*?
# )?SV = IV\(0x[[​:xdigit​:]]+\) at 0x[[​:xdigit​:]]+
# REFCNT = 1
# FLAGS = \(ROK\)
# RV = 0x[[​:xdigit​:]]+
# (?​: ALLOCATED at .*?
# )? SV = PVHV\(0x[[​:xdigit​:]]+\) at 0x[[​:xdigit​:]]+
# REFCNT = 3
# FLAGS = \(OOK,OVERLOAD,SHAREKEYS\)
# ARRAY = 0x[[​:xdigit​:]]+
# KEYS = 0
# FILL = 0
# MAX = 7
# RITER = -1
# EITER = 0x0
# RAND = 0x[[​:xdigit​:]]+
# NAMECOUNT = -3
# ENAME = "RWOM", "KLANK"
# \Z)'
# Looks like you failed 3 tests of 64.
../ext/Devel-Peek/t/Peek.t .. Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/64 subtests
  (less 1 skipped subtest​: 60 okay)

Test Summary Report
-------------------
../ext/Devel-Peek/t/Peek.t (Wstat​: 768 Tests​: 64 Failed​: 3)
  Failed tests​: 55, 57, 59
  Non-zero exit status​: 3
Files=1, Tests=64, 1 wallclock secs ( 0.01 usr + 0.01 sys = 0.03 CPU)
Result​: FAIL

C​:\p518src\perl-05f5908\t>
__________________________________________________________________________

Perl Info

Flags:
    category=core
    severity=low

Site configuration information for perl 5.18.0:

Configured by Owner at Fri May 10 16:51:40 2013.

Summary of my perl5 (revision 5 version 18 subversion 0 patch blead 
2013-05-09.00:26:46 05f5908f8de71a2ef1188624c0e09278342be6d0 
v5.17.11-137-g05f5908) configuration:
  Snapshot of: 05f5908f8de71a2ef1188624c0e09278342be6d0
  Platform:
    osname=MSWin32, osvers=5.1, archname=MSWin32-x86-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='cl', ccflags ='-nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -G6 -GL 
-DWIN32 -D_CONSOLE -DNO_STRICT  -DPERL_TEXTMODE_SCRIPTS 
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO 
-D_USE_32BIT_TIME_T',
    optimize='-O1 -MD -Zi -DNDEBUG -G6 -GL',
    cppflags='-DWIN32'
    ccversion='13.10.6030', gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64', 
lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf 
-ltcg  -libpath:"c:\perl518\lib\CORE"  -machine:x86'
    libpth="C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\lib"
    libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib  
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  
netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib  version.lib 
odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib
    perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib 
winspool.lib  comdlg32.lib advapi32.lib shell32.lib ole32.lib 
oleaut32.lib  netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib  
version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib
    libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl518.lib
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug 
-opt:ref,icf -ltcg  -libpath:"c:\perl518\lib\CORE"  -machine:x86'

Locally applied patches:
    RC0


@INC for perl 5.18.0:
    C:/p518src/perl-05f5908/lib
    .


Environment for perl 5.18.0:
    HOME (unset)
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=C:\Program Files\Microsoft Visual Studio .NET 
2003\Common7\IDE;C:\Program Files\Microsoft Visual Studio .NET 
2003\VC7\BIN;C:\Program Files\Microsoft Visual Studio .NET 
2003\Common7\Tools;C:\Program Files\Microsoft Visual Studio .NET 
2003\Common7\Tools\bin\prerelease;C:\Program Files\Microsoft Visual 
Studio .NET 2003\Common7\Tools\bin;C:\Program Files\Microsoft Visual 
Studio .NET 
2003\SDK\v1.1\bin;C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\wbem;
    PERL_BADLANG (unset)
    PERL_JSON_BACKEND=JSON::XS
    PERL_YAML_BACKEND=YAML
    SHELL (unset)

@p5pRT
Copy link
Author

p5pRT commented May 12, 2013

From @demerphq

On 11 May 2013 21​:23, bulk88 <perlbug-followup@​perl.org> wrote​:

# New Ticket Created by bulk88
# Please include the string​: [perl #117963]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=117963 >

This is a bug report for perl from bulk88@​hotmail.com,
generated with the help of perlbug 1.39 running under perl 5.18.0.

-----------------------------------------------------------------
[Please describe your issue here]

Turning on pre 5.18 has behaviour with a modified hv_func.h as such
______________________________________________________________
/* hash a key
*--------------------------------------------------------------------------------------
* The "hash seed" feature was added in Perl 5.8.1 to perturb the results
* to avoid "algorithmic complexity attacks".
*
* If USE_HASH_SEED is defined, hash randomisation is done by default
* If USE_HASH_SEED_EXPLICIT is defined, hash randomisation is done
* only if the environment variable PERL_HASH_SEED is set.
* (see also perl.c​:perl_parse() and S_init_tls_and_interp() and
util.c​:get_hash_seed())
*/

#ifndef PERL_SEEN_HV_FUNC_H /* compile once */
#define PERL_SEEN_HV_FUNC_H

#define PERL_HASH_FUNC_ONE_AT_A_TIME_OLD
#undef USE_HASH_SEED
#undef USE_HASH_SEED_EXPLICIT
______________________________________________________________

is causing the following unusual test failures on my machine. 32 bit
Windows XP.

This is non-standard build mode, so some test failures are expected,
at least until the Configure infrastructure learns about the new
defines, or i find time to learn more about the Configure structure
:-)

______________________________________________________________
C​:\p518src\perl-05f5908\t>..\perl.exe -I..\lib harness op/each.t
op/each.t .. # Failed test 58 - each() after insert produces warnings at
op/each
.t line 282
op/each.t .. Failed 1/59 subtests

Test Summary Report
-------------------
op/each.t (Wstat​: 0 Tests​: 59 Failed​: 1)
Failed test​: 58
Files=1, Tests=59, 1 wallclock secs ( 0.01 usr + 0.01 sys = 0.03 CPU)
Result​: FAIL

Given the build options you provided I don't expect this to fail, but
it doesnt entirely surprise me that it does. We initialize the
PL_hash_rand_bits var from the hash seed, so disabling hash seed
randomization might cause PL_hash_rand_bits to stay 0 or something.
Feel free to propose a patch to get_hash_seed().

C​:\p518src\perl-05f5908\t>..\perl.exe -I..\lib harness
../ext/Devel-Peek/t/Peek.t
../ext/Devel-Peek/t/Peek.t .. 1/?
# Failed test 'ENAME on a stash'
# at t/Peek.t line 80.
# 'SV = IV(0xa9e030) at 0xa9e034
# REFCNT = 1
# FLAGS = (ROK)
# RV = 0xa65db4
# SV = PVHV(0x8f07d4) at 0xa65db4
# REFCNT = 2
# FLAGS = (OOK,SHAREKEYS)
# ARRAY = 0xa93c4c
# KEYS = 0
# FILL = 0
# MAX = 7
# RITER = -1
# EITER = 0x0
#
# NAME = "RWOM"
# ENAME = "RWOM"
# '
# doesn't match '(?^ms​:\A(?​:ALLOCATED at .*?
# )?SV = IV\(0x[[​:xdigit​:]]+\) at 0x[[​:xdigit​:]]+
# REFCNT = 1
# FLAGS = \(ROK\)
# RV = 0x[[​:xdigit​:]]+
# (?​: ALLOCATED at .*?
# )? SV = PVHV\(0x[[​:xdigit​:]]+\) at 0x[[​:xdigit​:]]+
# REFCNT = 2
# FLAGS = \(OOK,SHAREKEYS\)
# ARRAY = 0x[[​:xdigit​:]]+
# KEYS = 0
# FILL = 0
# MAX = 7
# RITER = -1
# EITER = 0x0
# RAND = 0x[[​:xdigit​:]]+
# NAME = "RWOM"
# ENAME = "RWOM"
# \Z)'

Again, im not sure why your build options lead to this output (have
you missed some?). But these are basically because the devel peek code
thinks the hash iterator randomization is compiled out. I didnt have
time to figure out how to make the tests pass in the time I had, and
this is an experimental build mode, feel free to provide patches.
Basically what is happening is that the code to show the RAND and
LASTRAND fields of a hash iterator is conditional, but the tests dont
know that. Ideally this should be driven from %Configure data. That
aside however the "compile out" seems to have omitted a newline, so
there is a gap in the dump. :-(

I will do my best to look into this, but as it is an experimental
build mode I cant say when I'll get to it, and I invite patches to fix
the problems. Ill do my best to provide guidance if its needed.

Yves

--
perl -Mre=debug -e "/just|another|perl|hacker/"

@p5pRT
Copy link
Author

p5pRT commented May 12, 2013

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

@p5pRT
Copy link
Author

p5pRT commented May 12, 2013

From @Tux

On Sun, 12 May 2013 11​:31​:29 +0200, demerphq <demerphq@​gmail.com> wrote​:

On 11 May 2013 21​:23, bulk88 <perlbug-followup@​perl.org> wrote​:

# New Ticket Created by bulk88
# Please include the string​: [perl #117963]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=117963 >

This is a bug report for perl from bulk88@​hotmail.com,
generated with the help of perlbug 1.39 running under perl 5.18.0.

-----------------------------------------------------------------
[Please describe your issue here]

Turning on pre 5.18 has behaviour with a modified hv_func.h as such
______________________________________________________________
/* hash a key
*--------------------------------------------------------------------------------------
* The "hash seed" feature was added in Perl 5.8.1 to perturb the results
* to avoid "algorithmic complexity attacks".
*
* If USE_HASH_SEED is defined, hash randomisation is done by default
* If USE_HASH_SEED_EXPLICIT is defined, hash randomisation is done
* only if the environment variable PERL_HASH_SEED is set.
* (see also perl.c​:perl_parse() and S_init_tls_and_interp() and
util.c​:get_hash_seed())
*/

#ifndef PERL_SEEN_HV_FUNC_H /* compile once */
#define PERL_SEEN_HV_FUNC_H

#define PERL_HASH_FUNC_ONE_AT_A_TIME_OLD
#undef USE_HASH_SEED
#undef USE_HASH_SEED_EXPLICIT
______________________________________________________________

is causing the following unusual test failures on my machine. 32 bit
Windows XP.

This is non-standard build mode, so some test failures are expected,
at least until the Configure infrastructure learns about the new
defines, or i find time to learn more about the Configure structure
:-)

And I/we need to tell Config​::Perl​::V

______________________________________________________________
C​:\p518src\perl-05f5908\t>..\perl.exe -I..\lib harness op/each.t
op/each.t .. # Failed test 58 - each() after insert produces warnings at
op/each
.t line 282
op/each.t .. Failed 1/59 subtests

Test Summary Report
-------------------
op/each.t (Wstat​: 0 Tests​: 59 Failed​: 1)
Failed test​: 58
Files=1, Tests=59, 1 wallclock secs ( 0.01 usr + 0.01 sys = 0.03 CPU)
Result​: FAIL

Given the build options you provided I don't expect this to fail, but
it doesnt entirely surprise me that it does. We initialize the
PL_hash_rand_bits var from the hash seed, so disabling hash seed
randomization might cause PL_hash_rand_bits to stay 0 or something.
Feel free to propose a patch to get_hash_seed().

C​:\p518src\perl-05f5908\t>..\perl.exe -I..\lib harness
../ext/Devel-Peek/t/Peek.t
../ext/Devel-Peek/t/Peek.t .. 1/?
# Failed test 'ENAME on a stash'
# at t/Peek.t line 80.
# 'SV = IV(0xa9e030) at 0xa9e034
# REFCNT = 1
# FLAGS = (ROK)
# RV = 0xa65db4
# SV = PVHV(0x8f07d4) at 0xa65db4
# REFCNT = 2
# FLAGS = (OOK,SHAREKEYS)
# ARRAY = 0xa93c4c
# KEYS = 0
# FILL = 0
# MAX = 7
# RITER = -1
# EITER = 0x0
#
# NAME = "RWOM"
# ENAME = "RWOM"
# '
# doesn't match '(?^ms​:\A(?​:ALLOCATED at .*?
# )?SV = IV\(0x[[​:xdigit​:]]+\) at 0x[[​:xdigit​:]]+
# REFCNT = 1
# FLAGS = \(ROK\)
# RV = 0x[[​:xdigit​:]]+
# (?​: ALLOCATED at .*?
# )? SV = PVHV\(0x[[​:xdigit​:]]+\) at 0x[[​:xdigit​:]]+
# REFCNT = 2
# FLAGS = \(OOK,SHAREKEYS\)
# ARRAY = 0x[[​:xdigit​:]]+
# KEYS = 0
# FILL = 0
# MAX = 7
# RITER = -1
# EITER = 0x0
# RAND = 0x[[​:xdigit​:]]+
# NAME = "RWOM"
# ENAME = "RWOM"
# \Z)'

Again, im not sure why your build options lead to this output (have
you missed some?). But these are basically because the devel peek code
thinks the hash iterator randomization is compiled out. I didnt have
time to figure out how to make the tests pass in the time I had, and
this is an experimental build mode, feel free to provide patches.
Basically what is happening is that the code to show the RAND and
LASTRAND fields of a hash iterator is conditional, but the tests dont
know that. Ideally this should be driven from %Configure data. That
aside however the "compile out" seems to have omitted a newline, so
there is a gap in the dump. :-(

I will do my best to look into this, but as it is an experimental
build mode I cant say when I'll get to it, and I invite patches to fix
the problems. Ill do my best to provide guidance if its needed.

Yves

--
perl -Mre=debug -e "/just|another|perl|hacker/"

--
H.Merijn Brand http​://tux.nl Perl Monger http​://amsterdam.pm.org/
using perl5.00307 .. 5.17 porting perl5 on HP-UX, AIX, and openSUSE
http​://mirrors.develooper.com/hpux/ http​://www.test-smoke.org/
http​://qa.perl.org http​://www.goldmark.org/jeff/stupid-disclaimers/

@p5pRT
Copy link
Author

p5pRT commented May 13, 2013

From @bulk88

On Sun May 12 02​:32​:08 2013, demerphq wrote​:

Given the build options you provided I don't expect this to fail, but
it doesnt entirely surprise me that it does. We initialize the
PL_hash_rand_bits var from the hash seed, so disabling hash seed
randomization might cause PL_hash_rand_bits to stay 0 or something.
Feel free to propose a patch to get_hash_seed().

C​:\p518src\perl-05f5908\t>..\perl.exe -I..\lib harness
../ext/Devel-Peek/t/Peek.t
.................................>
Again, im not sure why your build options lead to this output (have
you missed some?). But these are basically because the devel peek code
thinks the hash iterator randomization is compiled out. I didnt have
time to figure out how to make the tests pass in the time I had, and
this is an experimental build mode, feel free to provide patches.
Basically what is happening is that the code to show the RAND and
LASTRAND fields of a hash iterator is conditional, but the tests dont
know that. Ideally this should be driven from %Configure data. That
aside however the "compile out" seems to have omitted a newline, so
there is a gap in the dump. :-(

I will do my best to look into this, but as it is an experimental
build mode I cant say when I'll get to it, and I invite patches to fix
the problems. Ill do my best to provide guidance if its needed.

I am attaching a diff from 05f5908 to
what I built and generated those test fails. The diff isn't from the
public repo. I might have set the defines in wrong places (in headers
instead of command line/make file or vice versa).

--
bulk88 ~ bulk88 at hotmail.com

@p5pRT
Copy link
Author

p5pRT commented May 13, 2013

From @bulk88

0001-getting-old-has-behaviour.patch
From 65e73ddf707f386b52a7a439a780042216726f27 Mon Sep 17 00:00:00 2001
From: bulk88 <bulk88@hotmail.com>
Date: Sun, 12 May 2013 22:27:14 -0400
Subject: [PATCH] getting old has behaviour

---
 hv.h           |    2 ++
 hv_func.h      |    4 ++++
 perl.c         |   10 +++++-----
 perl.h         |    9 ++++-----
 win32/Makefile |   16 ++++++++--------
 win32/win32.c  |    2 +-
 6 files changed, 24 insertions(+), 19 deletions(-)

diff --git a/hv.h b/hv.h
index 2eea477..da22a0c 100644
--- a/hv.h
+++ b/hv.h
@@ -12,6 +12,8 @@
  * Currently disabling this functionality will break a few tests, but should otherwise work fine.
  * See perlrun for more details. */
 
+#define PERL_PERTURB_KEYS_DISABLED 1
+
 #if defined(PERL_PERTURB_KEYS_DISABLED)
 #   define PL_HASH_RAND_BITS_ENABLED        0
 #   define PERL_HASH_ITER_BUCKET(iter)      ((iter)->xhv_riter)
diff --git a/hv_func.h b/hv_func.h
index 7678807..a40386d 100644
--- a/hv_func.h
+++ b/hv_func.h
@@ -12,6 +12,10 @@
 #ifndef PERL_SEEN_HV_FUNC_H /* compile once */
 #define PERL_SEEN_HV_FUNC_H
 
+#define PERL_HASH_FUNC_ONE_AT_A_TIME_OLD
+#undef USE_HASH_SEED
+#undef USE_HASH_SEED_EXPLICIT
+
 #if !( 0 \
         || defined(PERL_HASH_FUNC_SIPHASH) \
         || defined(PERL_HASH_FUNC_SDBM) \
diff --git a/perl.c b/perl.c
index 80b3bdd..0f8d4f7 100644
--- a/perl.c
+++ b/perl.c
@@ -1883,7 +1883,7 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit)
 #if SILENT_NO_TAINT_SUPPORT
             /* silently ignore */
 #elif NO_TAINT_SUPPORT
-            Perl_croak("This perl was compiled without taint support. "
+            Perl_croak_nocontext("This perl was compiled without taint support. "
                        "Cowardly refusing to run with -t or -T flags");
 #else
 	    CHECK_MALLOC_TOO_LATE_FOR('t');
@@ -1898,7 +1898,7 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit)
 #if SILENT_NO_TAINT_SUPPORT
             /* silently ignore */
 #elif NO_TAINT_SUPPORT
-            Perl_croak("This perl was compiled without taint support. "
+            Perl_croak_nocontext("This perl was compiled without taint support. "
                        "Cowardly refusing to run with -t or -T flags");
 #else
 	    CHECK_MALLOC_TOO_LATE_FOR('T');
@@ -2015,7 +2015,7 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit)
 #if SILENT_NO_TAINT_SUPPORT
             /* silently ignore */
 #elif NO_TAINT_SUPPORT
-            Perl_croak("This perl was compiled without taint support. "
+            Perl_croak_nocontext("This perl was compiled without taint support. "
                        "Cowardly refusing to run with -t or -T flags");
 #else
 	    CHECK_MALLOC_TOO_LATE_FOR('T');
@@ -2054,7 +2054,7 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit)
 #if SILENT_NO_TAINT_SUPPORT
             /* silently ignore */
 #elif NO_TAINT_SUPPORT
-                    Perl_croak("This perl was compiled without taint support. "
+                    Perl_croak_nocontext("This perl was compiled without taint support. "
                                "Cowardly refusing to run with -t or -T flags");
 #else
 		    if( !TAINTING_get) {
@@ -3383,7 +3383,7 @@ Perl_moreswitches(pTHX_ const char *s)
 #if SILENT_NO_TAINT_SUPPORT
             /* silently ignore */
 #elif NO_TAINT_SUPPORT
-        Perl_croak("This perl was compiled without taint support. "
+        Perl_croak_nocontext("This perl was compiled without taint support. "
                    "Cowardly refusing to run with -t or -T flags");
 #else
         if (!TAINTING_get)
diff --git a/perl.h b/perl.h
index 89f4c98..54b51c7 100644
--- a/perl.h
+++ b/perl.h
@@ -2494,11 +2494,10 @@ typedef AV PAD;
 typedef AV PADNAMELIST;
 typedef SV PADNAME;
 
-/* XXX for 5.18, disable the COW by default
- * #if !defined(PERL_OLD_COPY_ON_WRITE) && !defined(PERL_NEW_COPY_ON_WRITE) && !defined(PERL_NO_COW)
- * # define PERL_NEW_COPY_ON_WRITE
- * #endif
- */
+#if !defined(PERL_OLD_COPY_ON_WRITE) && !defined(PERL_NEW_COPY_ON_WRITE) && !defined(PERL_NO_COW)
+# define PERL_NEW_COPY_ON_WRITE
+#endif
+
 
 #if defined(PERL_OLD_COPY_ON_WRITE) || defined(PERL_NEW_COPY_ON_WRITE)
 # if defined(PERL_OLD_COPY_ON_WRITE) && defined(PERL_NEW_COPY_ON_WRITE)
diff --git a/win32/Makefile b/win32/Makefile
index b8cb17f..7ad9d1f 100644
--- a/win32/Makefile
+++ b/win32/Makefile
@@ -21,7 +21,7 @@
 # newly built perl.
 #
 INST_DRV	= c:
-INST_TOP	= $(INST_DRV)\perl
+INST_TOP	= $(INST_DRV)\perl518
 
 #
 # Uncomment if you want to build a 32-bit Perl using a 32-bit compiler
@@ -102,9 +102,9 @@ USE_LARGE_FILES	= define
 # uncomment exactly one of the following
 #
 # Visual C++ 6.x (aka Visual C++ 98)
-CCTYPE		= MSVC60
+#CCTYPE		= MSVC60
 # Visual C++ .NET 2002/2003 (aka Visual C++ 7.x) (full version)
-#CCTYPE		= MSVC70
+CCTYPE		= MSVC70
 # Visual C++ Toolkit 2003 (aka Visual C++ 7.x) (free command-line tools)
 #CCTYPE		= MSVC70FREE
 # Windows Server 2003 SP1 Platform SDK (April 2005)
@@ -191,7 +191,7 @@ CCLIBDIR	= $(CCHOME)\lib
 #
 # Additional compiler flags can be specified here.
 #
-BUILDOPT	= $(BUILDOPTEXTRA)
+BUILDOPT	= $(BUILDOPTEXTRA) 
 
 #
 # This should normally be disabled.  Enabling it will disable the File::Glob
@@ -429,7 +429,7 @@ OPTIMIZE	= -Od -MD -Zi -DDEBUGGING
 LINK_DBG	= -debug
 !ELSE
 # -O1 yields smaller code, which turns out to be faster than -O2 on x86 and x64
-OPTIMIZE	= -O1 -MD -Zi -DNDEBUG
+OPTIMIZE	= -O1 -MD -Zi -DNDEBUG -G6
 # we enable debug symbols in release builds also
 LINK_DBG	= -debug -opt:ref,icf
 # you may want to enable this if you want COFF symbols in the executables
@@ -438,11 +438,11 @@ LINK_DBG	= -debug -opt:ref,icf
 # installed to get better stack traces from just the PDB symbols, so we
 # avoid the bloat of COFF symbols by default.
 #LINK_DBG	= $(LINK_DBG) -debugtype:both
-!  IF "$(WIN64)" == "define"
+#!  IF "$(WIN64)" == "define"
 # enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG)
 OPTIMIZE	= $(OPTIMIZE) -GL
 LINK_DBG	= $(LINK_DBG) -ltcg
-!  ENDIF
+#!  ENDIF
 !ENDIF
 
 !IF "$(WIN64)" == "define"
@@ -500,7 +500,7 @@ EXEOUT_FLAG	= -Fe
 CFLAGS_O	= $(CFLAGS) $(BUILDOPT)
 
 !IF "$(PREMSVC80)" == "undef"
-LINK_FLAGS	= $(LINK_FLAGS) "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"
+#LINK_FLAGS	= $(LINK_FLAGS) "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"
 !ELSE
 RSC_FLAGS	= -DINCLUDE_MANIFEST
 !ENDIF
diff --git a/win32/win32.c b/win32/win32.c
index bda5356..3dd4e82 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -4362,7 +4362,7 @@ Perl_win32_init(int *argcp, char ***argvp)
      * the standard control classes.  Without this even normal Windows APIs
      * like MessageBox() can fail under some versions of Windows XP.
      */
-    InitCommonControls();
+    //InitCommonControls();
 
     g_osver.dwOSVersionInfoSize = sizeof(g_osver);
     GetVersionEx(&g_osver);
-- 
1.7.9.msysgit.0

@p5pRT
Copy link
Author

p5pRT commented Oct 6, 2015

From @jkeenan

On Sun May 12 19​:35​:13 2013, bulk88 wrote​:

On Sun May 12 02​:32​:08 2013, demerphq wrote​:

Given the build options you provided I don't expect this to fail, but
it doesnt entirely surprise me that it does. We initialize the
PL_hash_rand_bits var from the hash seed, so disabling hash seed
randomization might cause PL_hash_rand_bits to stay 0 or something.
Feel free to propose a patch to get_hash_seed().

C​:\p518src\perl-05f5908\t>..\perl.exe -I..\lib harness
../ext/Devel-Peek/t/Peek.t
.................................>
Again, im not sure why your build options lead to this output (have
you missed some?). But these are basically because the devel peek code
thinks the hash iterator randomization is compiled out. I didnt have
time to figure out how to make the tests pass in the time I had, and
this is an experimental build mode, feel free to provide patches.
Basically what is happening is that the code to show the RAND and
LASTRAND fields of a hash iterator is conditional, but the tests dont
know that. Ideally this should be driven from %Configure data. That
aside however the "compile out" seems to have omitted a newline, so
there is a gap in the dump. :-(

I will do my best to look into this, but as it is an experimental
build mode I cant say when I'll get to it, and I invite patches to fix
the problems. Ill do my best to provide guidance if its needed.

I am attaching a diff from 05f5908 to
what I built and generated those test fails. The diff isn't from the
public repo. I might have set the defines in wrong places (in headers
instead of command line/make file or vice versa).

There has been no further discussion in this ticket in nearly two-and-a-half years. And when there was no discussion, there was little agreement on changes to be made.

I recommend that this ticket be closed and am taking it for the purpose of closing it within 7 days unless there is a compelling reason not to do so.

Thank you very much.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Oct 14, 2015

From @jkeenan

On Mon Oct 05 19​:09​:12 2015, jkeenan wrote​:

On Sun May 12 19​:35​:13 2013, bulk88 wrote​:

On Sun May 12 02​:32​:08 2013, demerphq wrote​:

Given the build options you provided I don't expect this to fail,
but
it doesnt entirely surprise me that it does. We initialize the
PL_hash_rand_bits var from the hash seed, so disabling hash seed
randomization might cause PL_hash_rand_bits to stay 0 or something.
Feel free to propose a patch to get_hash_seed().

C​:\p518src\perl-05f5908\t>..\perl.exe -I..\lib harness
../ext/Devel-Peek/t/Peek.t
.................................>
Again, im not sure why your build options lead to this output (have
you missed some?). But these are basically because the devel peek
code
thinks the hash iterator randomization is compiled out. I didnt
have
time to figure out how to make the tests pass in the time I had,
and
this is an experimental build mode, feel free to provide patches.
Basically what is happening is that the code to show the RAND and
LASTRAND fields of a hash iterator is conditional, but the tests
dont
know that. Ideally this should be driven from %Configure data. That
aside however the "compile out" seems to have omitted a newline, so
there is a gap in the dump. :-(

I will do my best to look into this, but as it is an experimental
build mode I cant say when I'll get to it, and I invite patches to
fix
the problems. Ill do my best to provide guidance if its needed.

I am attaching a diff from 05f5908
to
what I built and generated those test fails. The diff isn't from the
public repo. I might have set the defines in wrong places (in headers
instead of command line/make file or vice versa).

There has been no further discussion in this ticket in nearly two-and-
a-half years. And when there was no discussion, there was little
agreement on changes to be made.

I recommend that this ticket be closed and am taking it for the
purpose of closing it within 7 days unless there is a compelling
reason not to do so.

No one spoke up in favor of keeping this ticket open; closing.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT p5pRT closed this as completed Oct 14, 2015
@p5pRT
Copy link
Author

p5pRT commented Oct 14, 2015

@jkeenan - Status changed from 'open' to 'rejected'

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

1 participant