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
[PATCH] fix segv for psudofork duping of SAVEt_GP_ALIASED_SV #14288
Comments
From @bulk88Created by @bulk88See attached patch. Perl Info
|
From @bulk880001-fix-segv-for-psudofork-duping-of-SAVEt_GP_ALIASED_SV.patchFrom 6b5636d69153597b7fda8b8b86d2e51e11bcdf26 Mon Sep 17 00:00:00 2001
From: Daniel Dragan <bulk88@hotmail.com>
Date: Mon, 1 Dec 2014 12:43:16 -0500
Subject: [PATCH] fix segv for psudofork duping of SAVEt_GP_ALIASED_SV
op/fork.t test 6 that contains "@a = (1..3);" will crash on Win32 with
special debugging heap and race condition rarely crash otherwise.
Refcnt mistake is from commit ff2a62e0c8 . See perl #40565 for details.
---
sv.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/sv.c b/sv.c
index b1a5da5..a9be92c 100644
--- a/sv.c
+++ b/sv.c
@@ -14265,11 +14265,13 @@ Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl, CLONE_PARAMS* param)
ptr = POPPTR(ss,ix);
TOPPTR(nss,ix) = parser_dup((const yy_parser*)ptr, param);
break;
- case SAVEt_GP_ALIASED_SV:
- ptr = POPPTR(ss,ix);
- TOPPTR(nss,ix) = gp_dup((GP *)ptr, param);
- ((GP *)ptr)->gp_refcnt++;
+ case SAVEt_GP_ALIASED_SV: {
+ GP * gp_ptr = POPPTR(ss,ix);
+ GP * new_gp_ptr = gp_dup(gp_ptr, param);
+ TOPPTR(nss,ix) = new_gp_ptr;
+ new_gp_ptr->gp_refcnt++;
break;
+ }
default:
Perl_croak(aTHX_
"panic: ss_dup inconsistency (%"IVdf")", (IV) type);
--
1.7.9.msysgit.0
|
From @cpansproutOn Mon Dec 01 09:44:18 2014, bulk88 wrote:
Thank you for fixing such a stupid error on my part. I have applied it as 64c909d. -- Father Chrysostomos |
The RT System itself - Status changed from 'new' to 'open' |
@cpansprout - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#123339 (status was 'resolved')
Searchable as RT123339$
The text was updated successfully, but these errors were encountered: