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

[EXPERIMENT] the :win32 pseudolayer #13198

Closed
p5pRT opened this issue Aug 25, 2013 · 15 comments
Closed

[EXPERIMENT] the :win32 pseudolayer #13198

p5pRT opened this issue Aug 25, 2013 · 15 comments
Labels
experiment ticket tracking an active experiment

Comments

@p5pRT
Copy link

p5pRT commented Aug 25, 2013

Migrated from rt.perl.org#119453 (status was 'resolved')

Searchable as RT119453$

@p5pRT
Copy link
Author

p5pRT commented Aug 25, 2013

From @rjbs

perlexperiment lists the :win32 pseudolayer as experimental, since perl version
I-don't-know-when.

Its status was discussed a few months ago in this thread​:

  http​://www.nntp.perl.org/group/perl.perl5.porters/2013/06/msg203089.html

It looks like the experiment has not gone well. Maybe it can be completed and
maybe it can't.

We should determine its state, its potential eventual value, and whether it
really can be gotten to work. If not, we should slate it for deletion.
Otherwise, we should sort out steps to get it done.

--
rjbs

@p5pRT
Copy link
Author

p5pRT commented Feb 27, 2014

From @rjbs

…at minimum, we should also issue an experimental-category warning when this layer is applied, starting in 5.21.early.

--
rjbs

@p5pRT
Copy link
Author

p5pRT commented Jun 3, 2014

From @tonycoz

On Wed Feb 26 16​:27​:20 2014, rjbs wrote​:

…at minimum, we should also issue an experimental-category warning
when this layer is applied, starting in 5.21.early.

Here's a patch.

Tony

@p5pRT
Copy link
Author

p5pRT commented Jun 3, 2014

From @tonycoz

0001-add-a-warning-for-using-the-win32-PerlIO-layer.patch
From aa7385ba368304520ab39c4730be9aadc5195e6f Mon Sep 17 00:00:00 2001
From: Tony Cook <tony@develop-help.com>
Date: Tue, 3 Jun 2014 16:56:40 +1000
Subject: [PATCH] add a warning for using the :win32 PerlIO layer

---
 lib/warnings.pm       |  258 +++++++++++++++++++++++++------------------------
 pod/perldiag.pod      |    8 ++
 regen/warnings.pl     |    4 +-
 t/lib/warnings/perlio |   14 +++
 t/op/caller.t         |    4 +-
 warnings.h            |   10 +-
 win32/win32io.c       |    5 +
 7 files changed, 172 insertions(+), 131 deletions(-)

diff --git a/lib/warnings.pm b/lib/warnings.pm
index 059c7c5..37e6e56 100644
--- a/lib/warnings.pm
+++ b/lib/warnings.pm
@@ -5,7 +5,7 @@
 
 package warnings;
 
-our $VERSION = '1.23';
+our $VERSION = '1.24';
 
 # Verify that we're called correctly so that warnings will work.
 # see also strict.pm.
@@ -276,6 +276,8 @@ The current hierarchy is:
          |                 +- experimental::signatures
          |                 |
          |                 +- experimental::smartmatch
+         |                 |
+         |                 +- experimental::win32_perlio
          |
          +- glob
          |
@@ -812,138 +814,144 @@ our %Offsets = (
     'experimental::postderef'=> 114,
     'experimental::signatures'=> 116,
     'syscalls'		=> 118,
+
+    # Warnings Categories added in Perl 5.021
+
+    'experimental::win32_perlio'=> 120,
   );
 
 our %Bits = (
-    'all'		=> "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55", # [0..59]
-    'ambiguous'		=> "\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00", # [29]
-    'bareword'		=> "\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00", # [30]
-    'closed'		=> "\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [6]
-    'closure'		=> "\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [1]
-    'debugging'		=> "\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [22]
-    'deprecated'	=> "\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [2]
-    'digit'		=> "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00", # [31]
-    'exec'		=> "\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [7]
-    'exiting'		=> "\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [3]
-    'experimental'	=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x55\x15", # [51..58]
-    'experimental::autoderef'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01", # [56]
-    'experimental::lexical_subs'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00", # [52]
-    'experimental::lexical_topic'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00", # [53]
-    'experimental::postderef'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04", # [57]
-    'experimental::regex_sets'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00", # [54]
-    'experimental::signatures'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10", # [58]
-    'experimental::smartmatch'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00", # [55]
-    'glob'		=> "\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [4]
-    'illegalproto'	=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00", # [47]
-    'imprecision'	=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00", # [46]
-    'inplace'		=> "\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [23]
-    'internal'		=> "\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00", # [24]
-    'io'		=> "\x00\x54\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40", # [5..11,59]
-    'layer'		=> "\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [8]
-    'malloc'		=> "\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00", # [25]
-    'misc'		=> "\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [12]
-    'newline'		=> "\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [9]
-    'non_unicode'	=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00", # [48]
-    'nonchar'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00", # [49]
-    'numeric'		=> "\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [13]
-    'once'		=> "\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [14]
-    'overflow'		=> "\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [15]
-    'pack'		=> "\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [16]
-    'parenthesis'	=> "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00", # [32]
-    'pipe'		=> "\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [10]
-    'portable'		=> "\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [17]
-    'precedence'	=> "\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00", # [33]
-    'printf'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00", # [34]
-    'prototype'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00", # [35]
-    'qw'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00", # [36]
-    'recursion'		=> "\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [18]
-    'redefine'		=> "\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [19]
-    'regexp'		=> "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [20]
-    'reserved'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00", # [37]
-    'semicolon'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00", # [38]
-    'severe'		=> "\x00\x00\x00\x00\x00\x54\x05\x00\x00\x00\x00\x00\x00\x00\x00", # [21..25]
-    'signal'		=> "\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00", # [26]
-    'substr'		=> "\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00", # [27]
-    'surrogate'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00", # [50]
-    'syntax'		=> "\x00\x00\x00\x00\x00\x00\x00\x55\x55\x15\x00\x40\x00\x00\x00", # [28..38,47]
-    'syscalls'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40", # [59]
-    'taint'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00", # [39]
-    'threads'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00", # [40]
-    'uninitialized'	=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00", # [41]
-    'unopened'		=> "\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [11]
-    'unpack'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00", # [42]
-    'untie'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00", # [43]
-    'utf8'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x15\x00\x00", # [44,48..50]
-    'void'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00", # [45]
+    'all'		=> "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x01", # [0..60]
+    'ambiguous'		=> "\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00", # [29]
+    'bareword'		=> "\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00", # [30]
+    'closed'		=> "\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [6]
+    'closure'		=> "\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [1]
+    'debugging'		=> "\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [22]
+    'deprecated'	=> "\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [2]
+    'digit'		=> "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00", # [31]
+    'exec'		=> "\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [7]
+    'exiting'		=> "\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [3]
+    'experimental'	=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x55\x15\x01", # [51..58,60]
+    'experimental::autoderef'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00", # [56]
+    'experimental::lexical_subs'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00", # [52]
+    'experimental::lexical_topic'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00", # [53]
+    'experimental::postderef'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00", # [57]
+    'experimental::regex_sets'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00", # [54]
+    'experimental::signatures'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00", # [58]
+    'experimental::smartmatch'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00", # [55]
+    'experimental::win32_perlio'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01", # [60]
+    'glob'		=> "\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [4]
+    'illegalproto'	=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00", # [47]
+    'imprecision'	=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00", # [46]
+    'inplace'		=> "\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [23]
+    'internal'		=> "\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [24]
+    'io'		=> "\x00\x54\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00", # [5..11,59]
+    'layer'		=> "\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [8]
+    'malloc'		=> "\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [25]
+    'misc'		=> "\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [12]
+    'newline'		=> "\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [9]
+    'non_unicode'	=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00", # [48]
+    'nonchar'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00", # [49]
+    'numeric'		=> "\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [13]
+    'once'		=> "\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [14]
+    'overflow'		=> "\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [15]
+    'pack'		=> "\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [16]
+    'parenthesis'	=> "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00", # [32]
+    'pipe'		=> "\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [10]
+    'portable'		=> "\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [17]
+    'precedence'	=> "\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00", # [33]
+    'printf'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00", # [34]
+    'prototype'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00", # [35]
+    'qw'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00", # [36]
+    'recursion'		=> "\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [18]
+    'redefine'		=> "\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [19]
+    'regexp'		=> "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [20]
+    'reserved'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00", # [37]
+    'semicolon'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00", # [38]
+    'severe'		=> "\x00\x00\x00\x00\x00\x54\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [21..25]
+    'signal'		=> "\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [26]
+    'substr'		=> "\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [27]
+    'surrogate'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00", # [50]
+    'syntax'		=> "\x00\x00\x00\x00\x00\x00\x00\x55\x55\x15\x00\x40\x00\x00\x00\x00", # [28..38,47]
+    'syscalls'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00", # [59]
+    'taint'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00", # [39]
+    'threads'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00", # [40]
+    'uninitialized'	=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00", # [41]
+    'unopened'		=> "\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [11]
+    'unpack'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00", # [42]
+    'untie'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00", # [43]
+    'utf8'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x15\x00\x00\x00", # [44,48..50]
+    'void'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00", # [45]
   );
 
 our %DeadBits = (
-    'all'		=> "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", # [0..59]
-    'ambiguous'		=> "\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00", # [29]
-    'bareword'		=> "\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00", # [30]
-    'closed'		=> "\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [6]
-    'closure'		=> "\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [1]
-    'debugging'		=> "\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [22]
-    'deprecated'	=> "\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [2]
-    'digit'		=> "\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00", # [31]
-    'exec'		=> "\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [7]
-    'exiting'		=> "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [3]
-    'experimental'	=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\xaa\x2a", # [51..58]
-    'experimental::autoderef'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02", # [56]
-    'experimental::lexical_subs'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00", # [52]
-    'experimental::lexical_topic'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00", # [53]
-    'experimental::postderef'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08", # [57]
-    'experimental::regex_sets'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00", # [54]
-    'experimental::signatures'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20", # [58]
-    'experimental::smartmatch'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00", # [55]
-    'glob'		=> "\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [4]
-    'illegalproto'	=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00", # [47]
-    'imprecision'	=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00", # [46]
-    'inplace'		=> "\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [23]
-    'internal'		=> "\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00", # [24]
-    'io'		=> "\x00\xa8\xaa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80", # [5..11,59]
-    'layer'		=> "\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [8]
-    'malloc'		=> "\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00", # [25]
-    'misc'		=> "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [12]
-    'newline'		=> "\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [9]
-    'non_unicode'	=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00", # [48]
-    'nonchar'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00", # [49]
-    'numeric'		=> "\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [13]
-    'once'		=> "\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [14]
-    'overflow'		=> "\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [15]
-    'pack'		=> "\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [16]
-    'parenthesis'	=> "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00", # [32]
-    'pipe'		=> "\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [10]
-    'portable'		=> "\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [17]
-    'precedence'	=> "\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00", # [33]
-    'printf'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00", # [34]
-    'prototype'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00", # [35]
-    'qw'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00", # [36]
-    'recursion'		=> "\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [18]
-    'redefine'		=> "\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [19]
-    'regexp'		=> "\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [20]
-    'reserved'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00", # [37]
-    'semicolon'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00", # [38]
-    'severe'		=> "\x00\x00\x00\x00\x00\xa8\x0a\x00\x00\x00\x00\x00\x00\x00\x00", # [21..25]
-    'signal'		=> "\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00", # [26]
-    'substr'		=> "\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00", # [27]
-    'surrogate'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00", # [50]
-    'syntax'		=> "\x00\x00\x00\x00\x00\x00\x00\xaa\xaa\x2a\x00\x80\x00\x00\x00", # [28..38,47]
-    'syscalls'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80", # [59]
-    'taint'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00", # [39]
-    'threads'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00", # [40]
-    'uninitialized'	=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00", # [41]
-    'unopened'		=> "\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [11]
-    'unpack'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00", # [42]
-    'untie'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00", # [43]
-    'utf8'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x2a\x00\x00", # [44,48..50]
-    'void'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00", # [45]
+    'all'		=> "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\x02", # [0..60]
+    'ambiguous'		=> "\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00", # [29]
+    'bareword'		=> "\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00", # [30]
+    'closed'		=> "\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [6]
+    'closure'		=> "\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [1]
+    'debugging'		=> "\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [22]
+    'deprecated'	=> "\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [2]
+    'digit'		=> "\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00", # [31]
+    'exec'		=> "\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [7]
+    'exiting'		=> "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [3]
+    'experimental'	=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\xaa\x2a\x02", # [51..58,60]
+    'experimental::autoderef'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00", # [56]
+    'experimental::lexical_subs'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00", # [52]
+    'experimental::lexical_topic'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00", # [53]
+    'experimental::postderef'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00", # [57]
+    'experimental::regex_sets'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00", # [54]
+    'experimental::signatures'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00", # [58]
+    'experimental::smartmatch'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00", # [55]
+    'experimental::win32_perlio'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02", # [60]
+    'glob'		=> "\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [4]
+    'illegalproto'	=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00", # [47]
+    'imprecision'	=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00", # [46]
+    'inplace'		=> "\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [23]
+    'internal'		=> "\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [24]
+    'io'		=> "\x00\xa8\xaa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00", # [5..11,59]
+    'layer'		=> "\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [8]
+    'malloc'		=> "\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [25]
+    'misc'		=> "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [12]
+    'newline'		=> "\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [9]
+    'non_unicode'	=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00", # [48]
+    'nonchar'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00", # [49]
+    'numeric'		=> "\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [13]
+    'once'		=> "\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [14]
+    'overflow'		=> "\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [15]
+    'pack'		=> "\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [16]
+    'parenthesis'	=> "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00", # [32]
+    'pipe'		=> "\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [10]
+    'portable'		=> "\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [17]
+    'precedence'	=> "\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00", # [33]
+    'printf'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00", # [34]
+    'prototype'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00", # [35]
+    'qw'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00", # [36]
+    'recursion'		=> "\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [18]
+    'redefine'		=> "\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [19]
+    'regexp'		=> "\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [20]
+    'reserved'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00", # [37]
+    'semicolon'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00", # [38]
+    'severe'		=> "\x00\x00\x00\x00\x00\xa8\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [21..25]
+    'signal'		=> "\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [26]
+    'substr'		=> "\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [27]
+    'surrogate'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00", # [50]
+    'syntax'		=> "\x00\x00\x00\x00\x00\x00\x00\xaa\xaa\x2a\x00\x80\x00\x00\x00\x00", # [28..38,47]
+    'syscalls'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00", # [59]
+    'taint'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00", # [39]
+    'threads'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00", # [40]
+    'uninitialized'	=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00", # [41]
+    'unopened'		=> "\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [11]
+    'unpack'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00", # [42]
+    'untie'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00", # [43]
+    'utf8'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x2a\x00\x00\x00", # [44,48..50]
+    'void'		=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00", # [45]
   );
 
-$NONE     = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
-$DEFAULT  = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x00\x55\x15", # [2,56,52,53,57,54,58,55,4,22,23,25]
-$LAST_BIT = 120 ;
-$BYTES    = 15 ;
+$NONE     = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
+$DEFAULT  = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x00\x55\x15\x01", # [2,56,52,53,57,54,58,55,60,4,22,23,25]
+$LAST_BIT = 122 ;
+$BYTES    = 16 ;
 
 $All = "" ; vec($All, $Offsets{'all'}, 2) = 3 ;
 
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 848b1d5..5a200e7 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -4237,6 +4237,14 @@ are as follows.
 Both numeric and string values are accepted, but note that string values are
 case sensitive.  The default for this setting is "RANDOM" or 1.
 
+=item PerlIO layer ':win32' is experimental
+
+(S experimental::win32_perlio) The C<:win32> PerlIO layer is
+experimental.  If you want to take the risk of using this layer,
+simply disable this warning:
+
+    no warnings "experimental::win32_perlio";
+
 =item pid %x not a child
 
 (W exec) A warning peculiar to VMS.  Waitpid() was asked to wait for a
diff --git a/regen/warnings.pl b/regen/warnings.pl
index 0e65a26..49fc88a 100644
--- a/regen/warnings.pl
+++ b/regen/warnings.pl
@@ -100,6 +100,8 @@ my $tree = {
                                     [ 5.019, DEFAULT_ON ],
                                 'experimental::signatures' =>
                                     [ 5.019, DEFAULT_ON ],
+                                'experimental::win32_perlio' =>
+                                    [ 5.021, DEFAULT_ON ],
                         }],
 
        	 #'default'	=> [ 5.008, DEFAULT_ON ],
@@ -470,7 +472,7 @@ read_only_bottom_close_and_rename($pm);
 __END__
 package warnings;
 
-our $VERSION = '1.23';
+our $VERSION = '1.24';
 
 # Verify that we're called correctly so that warnings will work.
 # see also strict.pm.
diff --git a/t/lib/warnings/perlio b/t/lib/warnings/perlio
index 0ccc5a8..2be984f 100644
--- a/t/lib/warnings/perlio
+++ b/t/lib/warnings/perlio
@@ -56,3 +56,17 @@ close F;
 END { 1 while unlink "bb" } # KEEP THIS WITH THE LAST TEST.
 EXPECT
 Unknown PerlIO layer "xyz" at - line 5.
+########
+# NAME :win32 experimental warning
+# SKIP ?$^O ne "MSWin32" && ":win32 only available on Win32"
+open my $fh, ">:win32", "temp.txt" or die $^E;
+END { unlink "temp.txt"; }
+EXPECT
+PerlIO layer ':win32' is experimental at - line 1.
+########
+# NAME :win32 experimental warning disabled
+# SKIP ?$^O ne "MSWin32" && ":win32 only available on Win32"
+no warnings "experimental::win32_perlio";
+open my $fh, ">:win32", "temp.txt" or die $^E;
+END { unlink "temp.txt"; }
+EXPECT
diff --git a/t/op/caller.t b/t/op/caller.t
index 54a6bac..c43f576 100644
--- a/t/op/caller.t
+++ b/t/op/caller.t
@@ -111,8 +111,8 @@ sub testwarn {
 
     # The repetition number must be set to the value of $BYTES in
     # lib/warnings.pm
-    BEGIN { check_bits( ${^WARNING_BITS}, "\0" x 15, 'all bits off via "no warnings"' ) }
-    testwarn("\0" x 15, 'no bits');
+    BEGIN { check_bits( ${^WARNING_BITS}, "\0" x 16, 'all bits off via "no warnings"' ) }
+    testwarn("\0" x 16, 'no bits');
 
     use warnings;
     BEGIN { check_bits( ${^WARNING_BITS}, $default,
diff --git a/warnings.h b/warnings.h
index 66e4153..5bbb691 100644
--- a/warnings.h
+++ b/warnings.h
@@ -102,9 +102,13 @@
 #define WARN_EXPERIMENTAL__SIGNATURES 58
 #define WARN_SYSCALLS		 59
 
-#define WARNsize		15
-#define WARN_ALLstring		"\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125"
-#define WARN_NONEstring		"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+/* Warnings Categories added in Perl 5.021 */
+
+#define WARN_EXPERIMENTAL__WIN32_PERLIO 60
+
+#define WARNsize		16
+#define WARN_ALLstring		"\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125"
+#define WARN_NONEstring		"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
 
 #define isLEXWARN_on 	(PL_curcop->cop_warnings != pWARN_STD)
 #define isLEXWARN_off	(PL_curcop->cop_warnings == pWARN_STD)
diff --git a/win32/win32io.c b/win32/win32io.c
index d183e3b..0483602 100644
--- a/win32/win32io.c
+++ b/win32/win32io.c
@@ -61,6 +61,11 @@ PerlIOWin32_pushed(pTHX_ PerlIO *f, const char *mode, SV *arg, PerlIO_funcs *tab
    s->fd     = PerlIO_fileno(PerlIONext(f));
   }
  PerlIOBase(f)->flags |= PERLIO_F_OPEN;
+
+ Perl_ck_warner_d(aTHX_
+		  packWARN(WARN_EXPERIMENTAL__WIN32_PERLIO),
+		  "PerlIO layer ':win32' is experimental");
+
  return code;
 }
 
-- 
1.7.10.4

@p5pRT
Copy link
Author

p5pRT commented Jun 3, 2014

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

@p5pRT
Copy link
Author

p5pRT commented Jun 10, 2014

From @tonycoz

On Mon Jun 02 23​:58​:21 2014, tonyc wrote​:

On Wed Feb 26 16​:27​:20 2014, rjbs wrote​:

…at minimum, we should also issue an experimental-category warning
when this layer is applied, starting in 5.21.early.

Here's a patch.

No comments, so everyone thinks it's wonderful, applied as 7ac9292.

Tony

@p5pRT
Copy link
Author

p5pRT commented Jun 10, 2014

@tonycoz - Status changed from 'open' to 'resolved'

@p5pRT p5pRT closed this as completed Jun 10, 2014
@p5pRT
Copy link
Author

p5pRT commented Jun 10, 2014

From @rjbs

* Tony Cook via RT <perlbug-followup@​perl.org> [2014-06-09T20​:43​:10]

On Mon Jun 02 23​:58​:21 2014, tonyc wrote​:

On Wed Feb 26 16​:27​:20 2014, rjbs wrote​:

…at minimum, we should also issue an experimental-category warning
when this layer is applied, starting in 5.21.early.

Here's a patch.

No comments, so everyone thinks it's wonderful, applied as
7ac9292.

Thanks for the wonderful patch!

--
rjbs

@p5pRT
Copy link
Author

p5pRT commented Jul 7, 2014

From @bulk88

On Mon Jun 09 17​:43​:10 2014, tonyc wrote​:

On Mon Jun 02 23​:58​:21 2014, tonyc wrote​:

On Wed Feb 26 16​:27​:20 2014, rjbs wrote​:

…at minimum, we should also issue an experimental-category warning
when this layer is applied, starting in 5.21.early.

Here's a patch.

No comments, so everyone thinks it's wonderful, applied as
7ac9292.

Tony

As part of https://rt-archive.perl.org/perl5/Ticket/Display.html?id=122224 . This patch crashes when calling io/socket.t


Unhandled exception at 0x281b4170 (perl521.dll) in perl.exe​: 0xC0000005​: Access violation writing location 0xababacbb.


  perl521.dll!Perl_newSVpvn_flags(interpreter * my_perl=0x0090a44c, const char * const s=0x2825153c, const unsigned int len=0, const unsigned long flags=524288) Line 8856 + 0x48 C
  perl521.dll!S_mess_alloc(interpreter * my_perl=0x0090a44c) Line 1195 + 0x15 C
  perl521.dll!Perl_vmess(interpreter * my_perl=0x0090a44c, const char * pat=0x282ad7bc, char * * args=0x0012fa08) Line 1466 + 0x9 C
  perl521.dll!Perl_vwarn(interpreter * my_perl=0x0090a44c, const char * pat=0x282ad7bc, char * * args=0x0012fa08) Line 1814 + 0x11 C
  perl521.dll!Perl_vwarner(interpreter * my_perl=0x0090a44c, unsigned long err=60, const char * pat=0x282ad7bc, char * * args=0x0012fa08) Line 1922 + 0x11 C
  perl521.dll!Perl_ck_warner_d(interpreter * my_perl=0x0090a44c, unsigned long err=60, const char * pat=0x282ad7bc, ...) Line 1882 + 0x15 C
  perl521.dll!PerlIOWin32_pushed(interpreter * my_perl=0x0090a44c, _PerlIO * * f=0x00af39e4, const char * mode=0x0012fa74, sv * arg=0x00000000, _PerlIO_funcs * tab=0x282bd478) Line 67 + 0x10 C
  perl521.dll!PerlIO_push(interpreter * my_perl=0x0090a44c, _PerlIO * * f=0x00af39e4, _PerlIO_funcs * tab=0x282bd478, const char * mode=0x0012fa74, sv * arg=0x00000000) Line 1182 + 0x29 C
  perl521.dll!PerlIOBase_dup(interpreter * my_perl=0x0090a44c, _PerlIO * * f=0x00af39e4, _PerlIO * * o=0x008f6b54, clone_params * param=0x0012fbdc, int flags=1) Line 2223 + 0x26 C
  perl521.dll!PerlIOWin32_dup(interpreter * my_perl=0x0090a44c, _PerlIO * * f=0x00af39e4, _PerlIO * * o=0x008f6b54, clone_params * params=0x0012fbdc, int flags=1) Line 332 + 0x19 C
  perl521.dll!PerlIOBase_dup(interpreter * my_perl=0x0090a44c, _PerlIO * * f=0x00af39e4, _PerlIO * * o=0x008f6dfc, clone_params * param=0x0012fbdc, int flags=1) Line 2209 + 0x1a C
  perl521.dll!PerlIOBuf_dup(interpreter * my_perl=0x0090a44c, _PerlIO * * f=0x00af39e4, _PerlIO * * o=0x008f6dfc, clone_params * param=0x0012fbdc, int flags=1) Line 4270 + 0x19 C
  perl521.dll!PerlIO_fdupopen(interpreter * my_perl=0x0090a44c, _PerlIO * * f=0x008f6dfc, clone_params * param=0x0012fbdc, int flags=1) Line 509 + 0x23 C
  perl521.dll!Perl_fp_dup(interpreter * my_perl=0x0090a44c, _PerlIO * * const fp=0x008f6dfc, const char type=0, clone_params * const param=0x0012fbdc) Line 11907 + 0x13 C
  perl521.dll!PerlIO_clone(interpreter * my_perl=0x0090a44c, interpreter * proto=0x00364d2c, clone_params * param=0x0012fbdc) Line 622 + 0x13 C
  perl521.dll!perl_clone_using(interpreter * proto_perl=0x00364d2c, unsigned long flags=1, IPerlMem * ipM=0x0090cb14, IPerlMem * ipMS=0x0090cb30, IPerlMem * ipMP=0x0090cb4c, IPerlEnv * ipE=0x0090cb68, IPerlStdIO * ipStd=0x0090cba0, IPerlLIO * ipLIO=0x0090cc3c, IPerlDir * ipD=0x0090cca4, IPerlSock * ipS=0x0090ccd0, IPerlProc * ipP=0x0090cd80) Line 13729 + 0x11 C
  perl521.dll!PerlProcFork(IPerlProc * piPerl=0x003674d8) Line 1832 + 0x65 C++
  perl521.dll!Perl_pp_fork(interpreter * my_perl=0x00364d2c) Line 4084 + 0x16 C
  perl521.dll!Perl_runops_debug(interpreter * my_perl=0x00364d2c) Line 2360 + 0xd C
  perl521.dll!S_run_body(interpreter * my_perl=0x00364d2c, long oldscope=1) Line 2408 + 0xd C
  perl521.dll!perl_run(interpreter * my_perl=0x00364d2c) Line 2334 C
  perl521.dll!RunPerl(int argc=4, char * * argv=0x00364ce0, char * * env=0x00362de0) Line 258 + 0x9 C++
  perl.exe!main(int argc=4, char * * argv=0x00364ce0, char * * env=0x00363358) Line 23 + 0x12 C
  perl.exe!mainCRTStartup() Line 398 + 0xe C
  kernel32.dll!_BaseProcessStart@​4() + 0x23


Perl_newSVpvn_flags(pTHX_ const char *const s, const STRLEN len, const U32 flags)
{
  SV *sv;

  /* All the flags we don't support must be zero.
  And we're new code so I'm going to assert this from the start. */
/////////////CUT/////////////////
  SvFLAGS(sv) |= flags;

  if(flags & SVs_TEMP){
  PUSH_EXTEND_MORTAL__SV_C(sv);<<<<<<<<<<<<<<<<<<<<<<<Crash
  }

  return sv;
}


The problem is, PerlIO stuff is cloned at http​://perl5.git.perl.org/perl.git/blob/0b4755b186f82898af5e87b399a19617464b7e65​:/sv.c#l13729 long before the mortal stack is cloned at http​://perl5.git.perl.org/perl.git/blob/0b4755b186f82898af5e87b399a19617464b7e65​:/sv.c#l13947 so calling a warning during clone, that early, will crash.

I am not sure how to fix this. Should the fix be in PerlIOWin32_pushed? or should Perl_ck_warner_d or S_mess_alloc made safe? One choice is to skip emitting the warning if PL_tmps_stack is poisoned or NULL (depends on DEBUGGING), the other choice is to use some other interp var (IDK what) to indicate its too early to print warnings, other choice is to always use PL_mess_sv in S_mess_alloc at http​://perl5.git.perl.org/perl.git/blob/edd0583e505bf8be15700db63562c98bdf8be40c​:/util.c#l1194 but PL_mess_sv isn't arenaed, see http​://perl5.git.perl.org/perl.git/blob/edd0583e505bf8be15700db63562c98bdf8be40c​:/sv.c#l1300 and http​://perl5.git.perl.org/perl.git/blob/edd0583e505bf8be15700db63562c98bdf8be40c​:/sv.c#l979 , another choice is to call "fprintf(stderr" instead (many cavets, C printf doesn't support every Perl's SV printf does), another choice is to figure out we are cloning and interp and temporarily switch back to the parent perl thread/psuedo process to print the warning then switch back, the question then is, if/where is the parent perl interp * stored if proto interp * or CLONE_PARAMS * isn't available as a param to the function. new_perl->Isys_intern.internal_host isn't assigned to until after the clone is done and perl_clone_using returns.

--
bulk88 ~ bulk88 at hotmail.com

@p5pRT
Copy link
Author

p5pRT commented Jul 7, 2014

From @bulk88

[win32 layer warnings fork crash.PNG](https://rt-archive.perl.org/perl5/Ticket/Attachment/1299971/688680/win32 layer warnings fork crash.PNG)

@p5pRT
Copy link
Author

p5pRT commented Jul 7, 2014

From @tonycoz

On Sun, Jul 06, 2014 at 06​:22​:43PM -0700, bulk88 via RT wrote​:

On Mon Jun 09 17​:43​:10 2014, tonyc wrote​:

On Mon Jun 02 23​:58​:21 2014, tonyc wrote​:

On Wed Feb 26 16​:27​:20 2014, rjbs wrote​:

…at minimum, we should also issue an experimental-category warning
when this layer is applied, starting in 5.21.early.

Here's a patch.

No comments, so everyone thinks it's wonderful, applied as
7ac9292.

Tony

As part of https://rt-archive.perl.org/perl5/Ticket/Display.html?id=122224 . This patch crashes when calling io/socket.t

Part of that branch makes :win32 the default for handles (I think),
it's not appropriate to produce an experimental warning for a default,
so the perlio-win32 branch should revert
7ac9292.

If it ends up becoming not-the-default, then we revert the revert (or
rebase -i it out) and start worrying about the race.

I am not sure how to fix this. Should the fix be in
PerlIOWin32_pushed? or should Perl_ck_warner_d or S_mess_alloc made
safe? One choice is to skip emitting the warning if PL_tmps_stack is
poisoned or NULL (depends on DEBUGGING), the other choice is to use
some other interp var (IDK what) to indicate its too early to print
warnings, other choice is to always use PL_mess_sv in S_mess_alloc at
http​://perl5.git.perl.org/perl.git/blob/edd0583e505bf8be15700db63562c98bdf8be40c​:/util.c#l1194
but PL_mess_sv isn't arenaed, see
http​://perl5.git.perl.org/perl.git/blob/edd0583e505bf8be15700db63562c98bdf8be40c​:/sv.c#l1300
and
http​://perl5.git.perl.org/perl.git/blob/edd0583e505bf8be15700db63562c98bdf8be40c​:/sv.c#l979
, another choice is to call "fprintf(stderr" instead (many cavets, C
printf doesn't support every Perl's SV printf does), another choice is
to figure out we are cloning and interp and temporarily switch back to
the parent perl thread/psuedo process to print the warning then switch
back, the question then is, if/where is the parent perl interp *
stored if proto interp * or CLONE_PARAMS * isn't available as a param
to the function. new_perl->Isys_intern.internal_host isn't assigned to
until after the clone is done and perl_clone_using returns.

We probably can't use the native fprintf(), perl defines fprintf() etc
to call PerlIO_* functions.

If we do add a guard based on PL_tmps_stack or some other value, I
think we should a macro that anything else can use to guard against
this, rather than checking directly.

Tony

@p5pRT
Copy link
Author

p5pRT commented Jul 7, 2014

From @Leont

On Mon, Jul 7, 2014 at 7​:25 AM, Tony Cook <tony@​develop-help.com> wrote​:

Part of that branch makes :win32 the default for handles (I think),
it's not appropriate to produce an experimental warning for a default,
so the perlio-win32 branch should revert
7ac9292.

Yeah, I was planning to take that out anyway, but hadn't realized it'd be
this bad.

If it ends up becoming not-the-default, then we revert the revert (or
rebase -i it out) and start worrying about the race.

This sounds like we should make it non-croaking in case of clone anyway.

Leon

@rjbs rjbs added experiment ticket tracking an active experiment and removed Severity Low labels Apr 30, 2021
@rjbs
Copy link
Member

rjbs commented Apr 30, 2021

I can't tell why this ticket was closed. win32_perlio is still an active experiment, near as I can tell.

@rjbs rjbs reopened this Apr 30, 2021
@rjbs
Copy link
Member

rjbs commented Jun 20, 2021

I believe that the consensus is to remove this.

@rjbs
Copy link
Member

rjbs commented Jul 25, 2021

This has been removed.

@rjbs rjbs closed this as completed Jul 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experiment ticket tracking an active experiment
Projects
None yet
Development

No branches or pull requests

2 participants