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

The new ext/Errno/Errno_pm.PL in 5.13.4 tarball generates a bad Errno.pm #10574

Closed
p5pRT opened this issue Aug 24, 2010 · 10 comments
Closed

The new ext/Errno/Errno_pm.PL in 5.13.4 tarball generates a bad Errno.pm #10574

p5pRT opened this issue Aug 24, 2010 · 10 comments

Comments

@p5pRT
Copy link
Collaborator

@p5pRT p5pRT commented Aug 24, 2010

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

Searchable as RT77416$

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Aug 24, 2010

From @csjewell

Attached is what I get, (but applicable portion is below,) and it spews
output like this​:

Bareword "ExpoOffload" not allowed while "strict subs" in use at
C​:/SBPTest/perl/lib/Errno.pm line 22.
Bareword "OffloadModExpo" not allowed while "strict subs" in use at
C​:/SBPTest/perl/lib/Errno.pm line 22.

After that, it bails in the compilation step, of course, so lots of
perl's tests fail.

Would like to discuss possible solutions (maybe filter anything out that
is !is_a_number() for a value before printing out that hash?)

This is with the compiler and headers in the 32-bit "gcc4" compiler that
Strawberry uses (the compiler included in Strawberry Perl 5.12.x)

If there is anything you need to see, let me know.

--------- Portion of generated Errno.pm, full output file attached.

our $VERSION = "1.12";
$VERSION = eval $VERSION;
our @​ISA = 'Exporter';

my %err;

BEGIN {
  %err = (
  ENUM_REGISTRY_SETTINGS => -2,
  EXCEPTION_CONTINUE_EXECUTION => -1,
  ENUM_CURRENT_SETTINGS => -1,
  EMBDHLP_INPROC_HANDLER => 0,
  EXPO_OFFLOAD_REG_VALUE => ExpoOffload,
  ELF_VERSION => 0,
  EVENTLOG_FULL_INFO => 0,
  EWX_LOGOFF => 0,
  ERROR_SUCCESS => 0,
  EXPO_OFFLOAD_FUNC_NAME => OffloadModExpo,
...

--Curtis Jewell
--
Curtis Jewell
csjewell@​cpan.org http​://csjewell.dreamwidth.org/
perl@​csjewell.fastmail.us http​://csjewell.comyr.org/perl/

"Your random numbers are not that random" -- perl-5.10.1.tar.gz/util.c

Strawberry Perl for Windows betas​: http​://strawberryperl.com/beta/

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Aug 24, 2010

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Aug 24, 2010

From @csjewell

The attached patch implements a sanity check that should work.

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Aug 24, 2010

From @csjewell

0001-Sanity-check-on-Errno-values.patch
From 43777df23836a8627607501e7dc7b9d05d313d23 Mon Sep 17 00:00:00 2001
From: Curtis Jewell <perl@csjewell.fastmail.us>
Date: Tue, 24 Aug 2010 14:07:51 -0600
Subject: [PATCH] Sanity check on Errno values.

On a few machines (Win32/gcc using mingw64 headers) Errno.pm
will find a value that is not numeric for a proposed error
key. This change adds a sanity check to discard such keys.
---
 ext/Errno/Errno_pm.PL |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index 0899dde..fdaa48c 100644
--- a/ext/Errno/Errno_pm.PL
+++ b/ext/Errno/Errno_pm.PL
@@ -358,7 +358,7 @@ BEGIN {
     %err = (
 EDQ
    
-    my @err = sort { $err{$a} <=> $err{$b} } keys %err;
+    my @err = grep { $err{$_} =~ /-?\d+/ } sort { $err{$a} <=> $err{$b} } keys %err;
 
     foreach $err (@err) {
 	print "\t$err => $err{$err},\n";
-- 
1.6.5.1.1367.gcd48

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Aug 24, 2010

@csjewell - Status changed from 'new' to 'open'

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Aug 24, 2010

From @csjewell

A patch for this issue is attached to the bug, (and also attached here,
as I know that pulling patches off RT can be annoying) and it's working
for me. Want to take a look at it and see if it would create problems
for anyone else, or whether it should just be committed to blead?

Thanks!

--Curtis Jewell

On Tue, 24 Aug 2010 10​:49 -0700, perlbug-followup@​perl.org wrote​:

Greetings,

This message has been automatically generated in response to the
creation of a perl bug report regarding​:
"The new ext/Errno/Errno_pm.PL in 5.13.4 tarball generates a bad
Errno.pm".

There is no need to reply to this message right now. Your ticket has
been
assigned an ID of [perl #77416].

You can view your ticket at
http​://rt.perl.org/rt3/Ticket/Display.html?id=77416

Within the next 24-72 hours, your message will be posted to the perl
developers. Please be patient!

Please include the string​:

[perl #77416]

in the subject line of all future correspondence about this issue. To do
so,
you may reply to this message (please delete unnecessary quotes and
text.)

Thank you,
perlbug-followup@​perl.org
--
Curtis Jewell
csjewell@​cpan.org http​://csjewell.dreamwidth.org/
perl@​csjewell.fastmail.us http​://csjewell.comyr.org/perl/

"Your random numbers are not that random" -- perl-5.10.1.tar.gz/util.c

Strawberry Perl for Windows betas​: http​://strawberryperl.com/beta/

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Aug 24, 2010

From @csjewell

0001-Sanity-check-on-Errno-values.patch
From 43777df23836a8627607501e7dc7b9d05d313d23 Mon Sep 17 00:00:00 2001
From: Curtis Jewell <perl@csjewell.fastmail.us>
Date: Tue, 24 Aug 2010 14:07:51 -0600
Subject: [PATCH] Sanity check on Errno values.

On a few machines (Win32/gcc using mingw64 headers) Errno.pm
will find a value that is not numeric for a proposed error
key. This change adds a sanity check to discard such keys.
---
 ext/Errno/Errno_pm.PL |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index 0899dde..fdaa48c 100644
--- a/ext/Errno/Errno_pm.PL
+++ b/ext/Errno/Errno_pm.PL
@@ -358,7 +358,7 @@ BEGIN {
     %err = (
 EDQ
    
-    my @err = sort { $err{$a} <=> $err{$b} } keys %err;
+    my @err = grep { $err{$_} =~ /-?\d+/ } sort { $err{$a} <=> $err{$b} } keys %err;
 
     foreach $err (@err) {
 	print "\t$err => $err{$err},\n";
-- 
1.6.5.1.1367.gcd48

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Sep 2, 2010

From @rafl

Applied, after slight amending, as be54382.

Thank you!

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Sep 2, 2010

From [Unknown Contact. See original ticket]

Applied, after slight amending, as be54382.

Thank you!

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Sep 2, 2010

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.