Front page | perl.perl5.changes |
Postings from May 2008
Change 33950: Integrate:
From:
Dave Mitchell
Date:
May 30, 2008 08:45
Subject:
Change 33950: Integrate:
Change 33950 by davem@davem-pigeon on 2008/05/30 15:37:39
Integrate:
[ 33739]
Drop #ifdefs that became empty in change #32012.
[ 33751]
Subject: [patch]perl5db.pl - What I needed to get the forked debugger to work
From: "John E. Malmberg" <wb8tyw@qsl.net>
Date: Thu, 24 Apr 2008 21:36:51 -0500
Message-id: <481143C3.3080500@qsl.net>
[ 33753]
Revert change #33751, at least for now: this breaks perl5db.t
[ 33756]
Warnings within the condition of while are not reported with the
correct line number. TODO test inspired by code from Bram.
[ 33758]
Warnings within the conditional of until() and for() are not reported
with the correct line number. (See change 33756). Curiously, warnings
for the third expression of for() have the correct line number.
[ 33771]
Subject: [patch]perl5db.pl, perl5db.t - LINUX/UNIX/CYGWIN/VMS
From: "John E. Malmberg" <wb8tyw@qsl.net>
Date: Mon, 28 Apr 2008 00:39:16 -0500
Message-id: <48156304.30201@qsl.net>
Affected files ...
... //depot/maint-5.10/perl/lib/perl5db.pl#2 integrate
... //depot/maint-5.10/perl/lib/perl5db.t#2 integrate
... //depot/maint-5.10/perl/mg.c#11 integrate
... //depot/maint-5.10/perl/t/lib/warnings/9uninit#7 integrate
Differences ...
==== //depot/maint-5.10/perl/lib/perl5db.pl#2 (text) ====
Index: perl/lib/perl5db.pl
--- perl/lib/perl5db.pl#1~32694~ 2007-12-22 01:23:09.000000000 -0800
+++ perl/lib/perl5db.pl 2008-05-30 08:37:39.000000000 -0700
@@ -1363,7 +1363,9 @@
# As noted, this test really doesn't check accurately that the debugger
# is running at a terminal or not.
-if ( -e "/dev/tty" ) { # this is the wrong metric!
+my $dev_tty = '/dev/tty';
+ $dev_tty = 'TT:' if ($^O eq 'VMS');
+if ( -e $dev_tty ) { # this is the wrong metric!
$rcfile = ".perldb";
}
else {
@@ -6100,6 +6102,16 @@
$pidprompt = ''; # Shown anyway in titlebar
+ # We need $term defined or we can not switch to the newly created xterm
+ if ($tty ne '' && !defined $term) {
+ eval { require Term::ReadLine } or die $@;
+ if ( !$rl ) {
+ $term = new Term::ReadLine::Stub 'perldb', $IN, $OUT;
+ }
+ else {
+ $term = new Term::ReadLine 'perldb', $IN, $OUT;
+ }
+ }
# There's our new TTY.
return $tty;
} ## end sub xterm_get_fork_TTY
@@ -6766,18 +6778,6 @@
sub TTY {
- # With VMS we can get here with $term undefined, so we do not
- # switch to this terminal. There may be a better place to make
- # sure that $term is defined on VMS
- if ( @_ and ($^O eq 'VMS') and !defined($term) ) {
- eval { require Term::ReadLine } or die $@;
- if ( !$rl ) {
- $term = new Term::ReadLine::Stub 'perldb', $IN, $OUT;
- }
- else {
- $term = new Term::ReadLine 'perldb', $IN, $OUT;
- }
- }
if ( @_ and $term and $term->Features->{newTTY} ) {
# This terminal supports switching to a new TTY.
==== //depot/maint-5.10/perl/lib/perl5db.t#2 (text) ====
Index: perl/lib/perl5db.t
--- perl/lib/perl5db.t#1~32694~ 2007-12-22 01:23:09.000000000 -0800
+++ perl/lib/perl5db.t 2008-05-30 08:37:39.000000000 -0700
@@ -14,8 +14,10 @@
print "1..0 # Skip: no /dev/null\n";
exit 0;
}
- if (!-c "/dev/tty") {
- print "1..0 # Skip: no /dev/tty\n";
+my $dev_tty = '/dev/tty';
+ $dev_tty = 'TT:' if ($^O eq 'VMS');
+ if (!-c $dev_tty) {
+ print "1..0 # Skip: no $dev_tty\n";
exit 0;
}
}
==== //depot/maint-5.10/perl/mg.c#11 (text) ====
Index: perl/mg.c
--- perl/mg.c#10~33947~ 2008-05-28 18:09:23.000000000 -0700
+++ perl/mg.c 2008-05-30 08:37:39.000000000 -0700
@@ -1294,8 +1294,6 @@
#else
dTHX;
#endif
-#if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
-#endif
#ifdef FAKE_PERSISTENT_SIGNAL_HANDLERS
(void) rsignal(sig, PL_csighandlerp);
if (PL_sig_ignoring[sig]) return;
@@ -1308,8 +1306,6 @@
exit(1);
#endif
#endif
-#if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
-#endif
if (
#ifdef SIGILL
sig == SIGILL ||
==== //depot/maint-5.10/perl/t/lib/warnings/9uninit#7 (text) ====
Index: perl/t/lib/warnings/9uninit
--- perl/t/lib/warnings/9uninit#6~33945~ 2008-05-28 13:51:40.000000000 -0700
+++ perl/t/lib/warnings/9uninit 2008-05-30 08:37:39.000000000 -0700
@@ -1326,6 +1326,65 @@
Use of uninitialized value $undef in numeric eq (==) at - line 4.
Use of uninitialized value $undef in numeric eq (==) at - line 5.
########
+# TODO long standing bug - conditions of while loops
+use warnings;
+
+my $c;
+my $d = 1;
+while ($c == 0 && $d) {
+ # a
+ # few
+ # blank
+ # lines
+ undef $d;
+}
+EXPECT
+Use of uninitialized value $c in numeric eq (==) at - line 5.
+Use of uninitialized value $c in numeric eq (==) at - line 5.
+########
+# TODO long standing bug - conditions of until loops
+use warnings;
+
+my $c;
+my $d;
+until ($c == 1) {
+ # a
+ # few
+ # blank
+ # lines
+ $c = 1 if ++$d == 2;
+}
+EXPECT
+Use of uninitialized value $c in numeric eq (==) at - line 5.
+Use of uninitialized value $c in numeric eq (==) at - line 5.
+########
+# TODO long standing bug - conditions of for loops
+use warnings;
+
+my $c;
+my $d;
+for ($d = 1; $c == 0 && $d; ) {
+ # a
+ # few
+ # blank
+ # lines
+ undef $d;
+}
+
+my $e;
+for ($d = 2; $d > 0; $e = !($c == 0)) {
+ # a
+ # few
+ # blank
+ # lines
+ --$d;
+}
+EXPECT
+Use of uninitialized value $c in numeric eq (==) at - line 5.
+Use of uninitialized value $c in numeric eq (==) at - line 5.
+Use of uninitialized value $c in numeric eq (==) at - line 14.
+Use of uninitialized value $c in numeric eq (==) at - line 14.
+########
# TODO long standing bug - more general variant of the above problem
use warnings;
my $undef;
End of Patch.
-
Change 33950: Integrate:
by Dave Mitchell