Change 20580 by [EMAIL PROTECTED] on 2003/08/09 08:32:25
Integrate:
[ 20570]
Two more tests for #20566/#20568.
[ 20571]
Subject: [PATCH] Re: [PATCH] Re: Storing &PL_sv_undef as a hash key with
perl-5.8.x
From: Nicholas Clark <[EMAIL PROTECTED]>
Date: Fri, 8 Aug 2003 23:30:00 +0100
Message-ID: <[EMAIL PROTECTED]>
[ 20572]
Subject: [PATCH] kill 'INT' doesn't work on Windows
From: Jan Dubois <[EMAIL PROTECTED]>
Date: Fri, 08 Aug 2003 17:49:03 -0700
Message-ID: <[EMAIL PROTECTED]>
[ 20573]
Subject: Re: [PATCH] perlfaq8.pod and MakeMaker's PREFIX=
From: Michael G Schwern <[EMAIL PROTECTED]>
Date: Fri, 8 Aug 2003 13:59:50 -0700
Message-ID: <[EMAIL PROTECTED]>
[ 20574]
Subject: [ PATCH] Re: strange destruction problem on VMS
From: Dave Mitchell <[EMAIL PROTECTED]>
Date: Fri, 8 Aug 2003 22:28:48 +0100
Message-ID: <[EMAIL PROTECTED]>
[ 20577]
The libcygipc doesn't really work with the Perl SysV IPC tests
so no much point in adding it yet.
[ 20579]
Some updates for the memory use debugging section:
-DL is obsolete, mention Devel::Size, and Purify and valgrind.
Affected files ...
... //depot/maint-5.8/perl/ext/Storable/Storable.xs#17 integrate
... //depot/maint-5.8/perl/hints/cygwin.sh#3 integrate
... //depot/maint-5.8/perl/pod/perldebguts.pod#2 integrate
... //depot/maint-5.8/perl/pod/perlfaq8.pod#5 integrate
... //depot/maint-5.8/perl/sv.c#64 integrate
... //depot/maint-5.8/perl/t/op/pat.t#22 integrate
... //depot/maint-5.8/perl/win32/win32.c#14 integrate
Differences ...
==== //depot/maint-5.8/perl/ext/Storable/Storable.xs#17 (text) ====
Index: perl/ext/Storable/Storable.xs
--- perl/ext/Storable/Storable.xs#16~20460~ Sun Aug 3 12:09:33 2003
+++ perl/ext/Storable/Storable.xs Sat Aug 9 01:32:25 2003
@@ -1237,13 +1237,13 @@
if (cxt->hseen) {
hv_iterinit(cxt->hseen);
while ((he = hv_iternext(cxt->hseen))) /* Extra () for -Wall, grr.. */
- HeVAL(he) = &PL_sv_placeholder;
+ HeVAL(he) = &PL_sv_undef;
}
if (cxt->hclass) {
hv_iterinit(cxt->hclass);
while ((he = hv_iternext(cxt->hclass))) /* Extra () for -Wall, grr.. */
- HeVAL(he) = &PL_sv_placeholder;
+ HeVAL(he) = &PL_sv_undef;
}
/*
@@ -4929,7 +4929,7 @@
*/
#ifdef HAS_RESTRICTED_HASHES
- if (hv_store_flags(hv, kbuf, size, sv, 0, flags) == 0)
+ if (hv_store_flags(hv, kbuf, size, sv, 0, store_flags) == 0)
return (SV *) 0;
#else
if (!(store_flags & HVhek_PLACEHOLD))
==== //depot/maint-5.8/perl/hints/cygwin.sh#3 (text) ====
Index: perl/hints/cygwin.sh
--- perl/hints/cygwin.sh#2~20567~ Fri Aug 8 12:51:22 2003
+++ perl/hints/cygwin.sh Sat Aug 9 01:32:25 2003
@@ -23,8 +23,10 @@
libswanted=`echo " $libswanted " | sed -e 's/ c / /g'`
# - eliminate -lm, symlink to libcygwin.a
libswanted=`echo " $libswanted " | sed -e 's/ m / /g'`
-# - add libgdbm_compat & libcygipc to $libswanted
-libswanted="$libswanted gdbm_compat cygipc"
+# - add libgdbm_compat $libswanted
+# - libcygipc doesn't work much at all with
+# the Perl SysV IPC tests so not adding it --jhi 2003-08-09
+libswanted="$libswanted gdbm_compat"
test -z "$optimize" && optimize='-O2'
ccflags="$ccflags -DPERL_USE_SAFE_PUTENV"
# - otherwise i686-cygwin
==== //depot/maint-5.8/perl/pod/perldebguts.pod#2 (text) ====
Index: perl/pod/perldebguts.pod
--- perl/pod/perldebguts.pod#1~17645~ Fri Jul 19 12:29:57 2002
+++ perl/pod/perldebguts.pod Sat Aug 9 01:32:25 2003
@@ -749,12 +749,20 @@
about eight times more space in memory than the code took
on disk.
-There are two Perl-specific ways to analyze memory usage:
-$ENV{PERL_DEBUG_MSTATS} and B<-DL> command-line switch. The first
-is available only if Perl is compiled with Perl's malloc(); the
-second only if Perl was built with C<-DDEBUGGING>. See the
-instructions for how to do this in the F<INSTALL> podpage at
-the top level of the Perl source tree.
+The B<-DL> command-line switch is obsolete since circa Perl 5.6.0
+(it was available only if Perl was built with C<-DDEBUGGING>).
+The switch was used to track Perl's memory allocations and possible
+memory leaks. These days the use of malloc debugging tools like
+F<Purify> or F<valgrind> is suggested instead.
+
+One way to find out how much memory is being used by Perl data
+structures is to install the Devel::Size module from CPAN: it gives
+you the minimum number of bytes required to store a particular data
+structure. Please be mindful of the difference between the size()
+and total_size().
+
+If Perl has been compiled using Perl's malloc you can analyze Perl
+memory usage by setting the $ENV{PERL_DEBUG_MSTATS}.
=head2 Using C<$ENV{PERL_DEBUG_MSTATS}>
@@ -860,6 +868,9 @@
=back
=head2 Example of using B<-DL> switch
+
+(Note that -DL is obsolete since circa 5.6.0, and even before that
+Perl needed to be compiled with -DDEBUGGING.)
Below we show how to analyse memory usage by
==== //depot/maint-5.8/perl/pod/perlfaq8.pod#5 (text) ====
Index: perl/pod/perlfaq8.pod
--- perl/pod/perlfaq8.pod#4~18617~ Sat Feb 1 12:05:08 2003
+++ perl/pod/perlfaq8.pod Sat Aug 9 01:32:25 2003
@@ -1138,20 +1138,20 @@
=head2 How do I keep my own module/library directory?
-When you build modules, use the PREFIX option when generating
+When you build modules, use the PREFIX and LIB options when generating
Makefiles:
- perl Makefile.PL PREFIX=/u/mydir/perl
+ perl Makefile.PL PREFIX=/mydir/perl LIB=/mydir/perl/lib
then either set the PERL5LIB environment variable before you run
scripts that use the modules/libraries (see L<perlrun>) or say
- use lib '/u/mydir/perl';
+ use lib '/mydir/perl/lib';
This is almost the same as
BEGIN {
- unshift(@INC, '/u/mydir/perl');
+ unshift(@INC, '/mydir/perl/lib');
}
except that the lib module checks for machine-dependent subdirectories.
==== //depot/maint-5.8/perl/sv.c#64 (text) ====
Index: perl/sv.c
--- perl/sv.c#63~20317~ Tue Jul 29 08:31:56 2003
+++ perl/sv.c Sat Aug 9 01:32:25 2003
@@ -5048,6 +5048,7 @@
StructCopy(nsv,sv,SV);
SvREFCNT(sv) = refcnt;
SvFLAGS(nsv) |= SVTYPEMASK; /* Mark as freed */
+ SvREFCNT(nsv) = 0;
del_SV(nsv);
}
==== //depot/maint-5.8/perl/t/op/pat.t#22 (xtext) ====
Index: perl/t/op/pat.t
--- perl/t/op/pat.t#21~20569~ Fri Aug 8 14:07:09 2003
+++ perl/t/op/pat.t Sat Aug 9 01:32:25 2003
@@ -6,7 +6,7 @@
$| = 1;
-print "1..1010\n";
+print "1..1012\n";
BEGIN {
chdir 't' if -d 't';
@@ -3189,10 +3189,20 @@
ok("123\x{100}" =~ /^.*1.*23\x{100}$/, 'uft8 + multiple floating substr');
+# LATIN SMALL/CAPITAL LETTER A WITH MACRON
ok(" \x{101}" =~ qr/\x{100}/i,
"<[EMAIL PROTECTED]>");
+# LATIN SMALL/CAPITAL LETTER A WITH RING BELOW
ok(" \x{1E01}" =~ qr/\x{1E00}/i,
"<[EMAIL PROTECTED]>");
-# last test 1010
+# DESERET SMALL/CAPITAL LETTER LONG I
+ok(" \x{10428}" =~ qr/\x{10400}/i,
+ "<[EMAIL PROTECTED]>");
+
+# LATIN SMALL/CAPITAL LETTER A WITH RING BELOW + 'X'
+ok(" \x{1E01}x" =~ qr/\x{1E00}X/i,
+ "<[EMAIL PROTECTED]>");
+
+# last test 1012
==== //depot/maint-5.8/perl/win32/win32.c#14 (text) ====
Index: perl/win32/win32.c
--- perl/win32/win32.c#13~20460~ Sun Aug 3 12:09:33 2003
+++ perl/win32/win32.c Sat Aug 9 01:32:25 2003
@@ -1115,6 +1115,11 @@
if (GenerateConsoleCtrlEvent(CTRL_C_EVENT,pid))
return 0;
break;
+ case SIGBREAK:
+ case SIGTERM:
+ if (GenerateConsoleCtrlEvent(CTRL_BREAK_EVENT,pid))
+ return 0;
+ break;
default: /* For now be backwards compatible with perl5.6 */
case 9:
if (TerminateProcess(hProcess, sig)) {
@@ -1139,6 +1144,11 @@
if (GenerateConsoleCtrlEvent(CTRL_C_EVENT,pid))
retval = 0;
break;
+ case SIGBREAK:
+ case SIGTERM:
+ if (GenerateConsoleCtrlEvent(CTRL_BREAK_EVENT,pid))
+ retval = 0;
+ break;
default: /* For now be backwards compatible with perl5.6 */
case 9:
if (TerminateProcess(hProcess, sig))
End of Patch.