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
Threading crash with closures #7523
Comments
From jgmyers@proofpoint.comCreated by jgmyers@proofpoint.comThe following test program crashes on a multiprocessor box. Wrapping my $obj = save(eval 'sub { $bar = shift; }'); The various threads all share one underlying CV object; the object is use threads; sub init { for (my $i = 0; $i < 8; $i++) { foreach $thr (threads->list) { sub save sub task { init(); Perl Info
|
From @iabynOn Tue, Oct 05, 2004 at 05:25:15PM -0000, John Gardiner Myers wrote:
Thanks for the report. Your analysis is *nearly* spot on ;-) op_free() does a OP_REFCNT_LOCK before decrementing it, but none of I'll try to look into this properly when I get more time. (P5Pers: is there any reason not to just wrap the OpREFCNT_inc/OpREFCNT_dec Dave. -- |
The RT System itself - Status changed from 'new' to 'open' |
From @rgsDave Mitchell wrote:
Seems sensible. |
From @iabynOn Thu, Oct 07, 2004 at 12:16:55AM +0100, Dave Mitchell wrote:
Now fixed by the change below. It appears to make closure creation about 4% slower on ITHREAD builds. Dave. -- Change 23433 by davem@davem-splatty on 2004/10/29 21:04:17 [perl #31851] Threading crash with closures Affected files ... ... //depot/perl/pad.c#37 edit Differences ... ==== //depot/perl/pad.c#37 (text) ==== @@ -1410,7 +1410,9 @@ ==== //depot/perl/regcomp.c#340 (text) ==== @@ -4983,9 +4983,14 @@ PAD_RESTORE_LOCAL(old_comppad); ==== //depot/perl/sv.c#767 (text) ==== @@ -10244,7 +10244,9 @@ |
@iabyn - Status changed from 'open' to 'resolved' |
From ajsavige@yahoo.com.auFurther to John Myers' closure threading crash, I think I've <http://www.perlmonks.org/?node_id=409473> I'm pleased to report that Dave Mitchell's patch (Change 23433 by To shoehorn Dave's patch into Windows, I crudely hacked globals.c Inline Patch--- globals-orig.c Thu Apr 17 06:43:29 2003
+++ globals.c Tue Nov 23 15:58:26 2004
@@ -16,6 +16,10 @@
#define PERL_IN_GLOBALS_C
#include "perl.h"
+#if defined(USE_ITHREADS) && defined(WIN32)
+__declspec(dllexport) perl_mutex PL_op_mutex;
+#endif
+
int
Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...)
{
--- perlvars-orig.h Tue Aug 12 23:13:58 2003
+++ perlvars.h Tue Nov 23 16:03:09 2004
@@ -44,7 +44,7 @@
PERLVAR(Gmalloc_mutex, perl_mutex) /* Mutex for malloc */
#endif
-#if defined(USE_ITHREADS)
+#if defined(USE_ITHREADS) && !(defined(WIN32) && defined(PERL_IN_GLOBALS_C))
PERLVAR(Gop_mutex, perl_mutex) /* Mutex for op refcounting */
#endif
/-\ Find local movie times and trailers on Yahoo! Movies. |
From @steve-m-hayAndrew Savige wrote:
Dave's patch should have been fixed for Win32 by change 23499: http://public.activestate.com/cgi-bin/perlbrowse?patch=23499 - Steve Radan Computational Ltd. The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only. If you have received this message in error or there are any problems, please notify the sender immediately. The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden. Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd. The recipient(s) of this message should check it and any attached files for viruses: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email. |
Migrated from rt.perl.org#31851 (status was 'resolved')
Searchable as RT31851$
The text was updated successfully, but these errors were encountered: