summaryrefslogtreecommitdiff
path: root/t/op/magic.t
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-02-16 16:16:33 +0000
committerNicholas Clark <nick@ccl4.org>2010-02-16 16:20:12 +0000
commitbe1cf43c8dab9dd236839206d53611f7e7d2d856 (patch)
treebfa364bbad6e8e3e86029e0df585a0e00af6174b /t/op/magic.t
parentcc0193b268b34831b23946ad1ecf255c0404d836 (diff)
downloadperl-be1cf43c8dab9dd236839206d53611f7e7d2d856.tar.gz
Fix #72850 - reading $! shouldn't SEGV if Strerror(errno) returns NULL.
This can happen on some OSes for out of range errno values. The bug was introduced with 0097b436152452e4, which in turn fixed #61976. Test case by Steve Peters.
Diffstat (limited to 't/op/magic.t')
-rw-r--r--t/op/magic.t8
1 files changed, 7 insertions, 1 deletions
diff --git a/t/op/magic.t b/t/op/magic.t
index 975be11bb3..3df3e4bab0 100644
--- a/t/op/magic.t
+++ b/t/op/magic.t
@@ -12,7 +12,7 @@ BEGIN {
use warnings;
use Config;
-plan (tests => 79);
+plan (tests => 80);
$Is_MSWin32 = $^O eq 'MSWin32';
$Is_NetWare = $^O eq 'NetWare';
@@ -491,3 +491,9 @@ foreach my $sig (qw(__DIE__ _BOGUS_HOOK KILL THIRSTY)) {
is $SIG{$sig}, undef, "$sig is not present";
is delete $SIG{$sig}, undef, "delete of $sig returns undef";
}
+
+{
+ $! = 9999;
+ is int $!, 9999, q{[perl #72850] Core dump in bleadperl from perl -e '$! = 9999; $a = $!;'};
+
+}