Change 18414 by jhi@lyta on 2003/01/03 16:39:33
Integrate:
[ 18390]
Use a more likely location for the perl binary
[ 18406]
Under darwin 6.0+ (MacOSX 10.2) we have threadsafe
libc_r functions.
[ 18407]
Subject: Re: [perl #18257] Attempt to free unreferenced scalar (in 5 lines)
From: [EMAIL PROTECTED]
Date: Thu, 02 Jan 2003 17:16:04 +0000
Message-Id: <[EMAIL PROTECTED]>
[ 18408]
Subject: win32_msgwait() problem
From: Gurusamy Sarathy <[EMAIL PROTECTED]>
Date: Fri, 13 Dec 2002 17:31:59 -0800
Message-Id: <[EMAIL PROTECTED]>
[ 18411]
Subject: Re: [perl #19061] 'goto' confuses 'redo'
From: Stephen McCamant <[EMAIL PROTECTED]>
Date: Sun, 22 Dec 2002 22:09:51 -0500
Message-ID: <[EMAIL PROTECTED]>
[ 18413]
Change pp_lock to take a reference instead of a
scalar since it wouldn't fork for the HELEM/AELEM
case. This was reported in bug #10045
Affected files ...
... //depot/maint-5.8/perl/Porting/genlog#2 integrate
... //depot/maint-5.8/perl/ext/threads/shared/t/hv_refs.t#3 integrate
... //depot/maint-5.8/perl/hints/darwin.sh#3 integrate
... //depot/maint-5.8/perl/opcode.h#2 integrate
... //depot/maint-5.8/perl/opcode.pl#4 integrate
... //depot/maint-5.8/perl/opnames.h#2 integrate
... //depot/maint-5.8/perl/pp_ctl.c#6 integrate
... //depot/maint-5.8/perl/sv.c#16 integrate
... //depot/maint-5.8/perl/win32/win32.c#5 integrate
Differences ...
==== //depot/maint-5.8/perl/Porting/genlog#2 (xtext) ====
Index: perl/Porting/genlog
--- perl/Porting/genlog#1~17645~ Fri Jul 19 12:29:57 2002
+++ perl/Porting/genlog Fri Jan 3 08:39:33 2003
@@ -1,4 +1,4 @@
-#!/l/local/bin/perl -w
+#!/usr/local/bin/perl -w
#
# Generate a nice changelist by querying perforce.
#
==== //depot/maint-5.8/perl/ext/threads/shared/t/hv_refs.t#3 (text) ====
Index: perl/ext/threads/shared/t/hv_refs.t
--- perl/ext/threads/shared/t/hv_refs.t#2~18080~ Sun Nov 3 21:23:04 2002
+++ perl/ext/threads/shared/t/hv_refs.t Fri Jan 3 08:39:33 2003
@@ -30,7 +30,7 @@
use ExtUtils::testlib;
use strict;
-BEGIN { print "1..13\n" };
+BEGIN { print "1..14\n" };
use threads;
use threads::shared;
ok(1,1,"loaded");
@@ -74,4 +74,17 @@
threads->create(sub { my (%hash3); share(%hash3); $hash2{hash} = \%hash3;
$hash3{"thread"} = "yes"})->join();
ok(13, $hash1{hash}->{hash}->{thread} eq "yes", "Check hash created in another
thread");
}
+
+{
+ my $h = {a=>14};
+ my $r = \$h->{a};
+ share($r);
+ lock($r);
+ lock($h->{a});
+ ok(14, 1, "lock on helems now work, this was bug 10045");
+
+}
+
+
+
==== //depot/maint-5.8/perl/hints/darwin.sh#3 (text) ====
Index: perl/hints/darwin.sh
--- perl/hints/darwin.sh#2~18080~ Sun Nov 3 21:23:04 2002
+++ perl/hints/darwin.sh Fri Jan 3 08:39:33 2003
@@ -147,7 +147,10 @@
#
case "$usethreads$useithreads$use5005threads" in
*define*)
- cat <<EOM >&4
+ case "$osvers" in
+ [12345].*) cat <<EOM >&4
+
+
*** Warning, there might be problems with your libraries with
*** regards to threading. The test ext/threads/t/libc.t is likely
@@ -155,4 +158,7 @@
EOM
;;
+ *) usereentrant='define';;
+ esac
+
esac
==== //depot/maint-5.8/perl/opcode.h#2 (text+w) ====
Index: perl/opcode.h
--- perl/opcode.h#1~17645~ Fri Jul 19 12:29:57 2002
+++ perl/opcode.h Fri Jan 3 08:39:33 2003
@@ -1816,7 +1816,7 @@
0x00000014, /* egrent */
0x0000000c, /* getlogin */
0x0004281d, /* syscall */
- 0x00003604, /* lock */
+ 0x0000f604, /* lock */
0x00000044, /* threadsv */
0x00001404, /* setstate */
0x00000c40, /* method_named */
==== //depot/maint-5.8/perl/opcode.pl#4 (xtext) ====
Index: perl/opcode.pl
--- perl/opcode.pl#3~18173~ Fri Nov 22 18:02:33 2002
+++ perl/opcode.pl Fri Jan 3 08:39:33 2003
@@ -913,7 +913,7 @@
syscall syscall ck_fun imst@ S L
# For multi-threading
-lock lock ck_rfun s% S
+lock lock ck_rfun s% R
threadsv per-thread value ck_null ds0
# Control (contd.)
==== //depot/maint-5.8/perl/pp_ctl.c#6 (text) ====
Index: perl/pp_ctl.c
--- perl/pp_ctl.c#5~18400~ Thu Jan 2 18:37:11 2003
+++ perl/pp_ctl.c Fri Jan 3 08:39:33 2003
@@ -2004,11 +2004,15 @@
for (kid = cUNOPo->op_first; kid; kid = kid->op_sibling) {
if (kid == PL_lastgotoprobe)
continue;
- if ((kid->op_type == OP_NEXTSTATE || kid->op_type == OP_DBSTATE) &&
- (ops == opstack ||
- (ops[-1]->op_type != OP_NEXTSTATE &&
- ops[-1]->op_type != OP_DBSTATE)))
- *ops++ = kid;
+ if (kid->op_type == OP_NEXTSTATE || kid->op_type == OP_DBSTATE) {
+ if (ops == opstack)
+ *ops++ = kid;
+ else if (ops[-1]->op_type == OP_NEXTSTATE ||
+ ops[-1]->op_type == OP_DBSTATE)
+ ops[-1] = kid;
+ else
+ *ops++ = kid;
+ }
if ((o = dofindlabel(kid, label, ops, oplimit)))
return o;
}
==== //depot/maint-5.8/perl/sv.c#16 (text) ====
Index: perl/sv.c
--- perl/sv.c#15~18387~ Wed Jan 1 17:39:31 2003
+++ perl/sv.c Fri Jan 3 08:39:33 2003
@@ -3765,7 +3765,7 @@
switch (SvTYPE(sref)) {
case SVt_PVAV:
if (intro)
- SAVESPTR(GvAV(dstr));
+ SAVEGENERICSV(GvAV(dstr));
else
dref = (SV*)GvAV(dstr);
GvAV(dstr) = (AV*)sref;
@@ -3777,7 +3777,7 @@
break;
case SVt_PVHV:
if (intro)
- SAVESPTR(GvHV(dstr));
+ SAVEGENERICSV(GvHV(dstr));
else
dref = (SV*)GvHV(dstr);
GvHV(dstr) = (HV*)sref;
@@ -3795,7 +3795,7 @@
GvCVGEN(dstr) = 0; /* Switch off cacheness. */
PL_sub_generation++;
}
- SAVESPTR(GvCV(dstr));
+ SAVEGENERICSV(GvCV(dstr));
}
else
dref = (SV*)GvCV(dstr);
@@ -3845,21 +3845,21 @@
break;
case SVt_PVIO:
if (intro)
- SAVESPTR(GvIOp(dstr));
+ SAVEGENERICSV(GvIOp(dstr));
else
dref = (SV*)GvIOp(dstr);
GvIOp(dstr) = (IO*)sref;
break;
case SVt_PVFM:
if (intro)
- SAVESPTR(GvFORM(dstr));
+ SAVEGENERICSV(GvFORM(dstr));
else
dref = (SV*)GvFORM(dstr);
GvFORM(dstr) = (CV*)sref;
break;
default:
if (intro)
- SAVESPTR(GvSV(dstr));
+ SAVEGENERICSV(GvSV(dstr));
else
dref = (SV*)GvSV(dstr);
GvSV(dstr) = sref;
@@ -3872,8 +3872,6 @@
}
if (dref)
SvREFCNT_dec(dref);
- if (intro)
- SAVEFREESV(sref);
if (SvTAINTED(sstr))
SvTAINT(dstr);
return;
==== //depot/maint-5.8/perl/win32/win32.c#5 (text) ====
Index: perl/win32/win32.c
--- perl/win32/win32.c#4~18379~ Tue Dec 31 07:33:11 2002
+++ perl/win32/win32.c Fri Jan 3 08:39:33 2003
@@ -1912,6 +1912,8 @@
return ours;
}
+/* This function will not return until the timeout has elapsed, or until
+ * one of the handles is ready. */
DllExport DWORD
win32_msgwait(pTHX_ DWORD count, LPHANDLE handles, DWORD timeout, LPDWORD resultp)
{
@@ -1936,10 +1938,7 @@
}
if (result == WAIT_OBJECT_0 + count) {
/* Message has arrived - check it */
- if (win32_async_check(aTHX)) {
- /* was one of ours */
- break;
- }
+ (void)win32_async_check(aTHX);
}
else {
/* Not timeout or message - one of handles is ready */
End of Patch.