-
Notifications
You must be signed in to change notification settings - Fork 579
fork.t fails on Win32 since v5.15.4-465-g676a678 #11927
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
Comments
From @tonycozCreated by @tonycozx64 MSVC build, but smokes have been failing too: C:\Users\tony\dev\perl\git\perl\t>.\perl harness -v op/fork.t # Failed at ./test.pl line 1076 Test Summary Report Tested to be broken by 676a678: C:\Users\tony\dev\perl\git\perl\t>git log -n1 narrower localisation of PL_compcv around eval PL_compcv used to be localised around the entire string eval process, Similar to the fix there, this change moves the localisation of PL_compcv C:\Users\tony\dev\perl\git\perl\t>.\perl harness -v op/fork.t # Failed at ./test.pl line 1033 Test Summary Report C:\Users\tony\dev\perl\git\perl\t>cd .. C:\Users\tony\dev\perl\git\perl>git clean -dxf C:\Users\tony\dev\perl\git\perl>git checkout "676a678ac0683a727a07d56ed1a6e1fb59 C:\Users\tony\dev\perl\git\perl>cd win32 C:\Users\tony\dev\perl\git\perl\win32>dmake test-prep C:\Users\tony\dev\perl\git\perl\t>.\perl harness -v op/fork.t Perl Info
|
From @tonycozA little more information: C:\Users\tony\dev\perl\git\perl>.\perl -Ilib ..\forktest.pl C:\Users\tony\dev\perl\git\perl>type ..\forktest.pl |
@tonycoz - Status changed from 'new' to 'open' |
From @cpansproutFixed in commit 44c19e2. -- Father Chrysostomos |
From [Unknown Contact. See original ticket]Fixed in commit 44c19e2. -- Father Chrysostomos |
@cpansprout - Status changed from 'open' to 'resolved' |
From [email protected]Father Chrysostomos via RT wrote:
Is it really? I know I fixed *a* bug there, and I found it because I -zefram |
From @cpansproutOn Sat Feb 18 14:52:55 2012, zefram@fysh.org wrote:
I that case I misunderstood your commit message. I’ll re-open it. -- Father Chrysostomos |
@cpansprout - Status changed from 'resolved' to 'open' |
From @tonycozOn Fri Feb 03 00:49:17 2012, tonyc wrote:
I should have tried this before: C:\Users\tony\dev\perl\git\perl>.\perl -Dl -Ilib ..\forktest.pl EXECUTING... (..\forktest.pl:0) Entering new RUNOPS level |
From @janduboisSorry, I didn't get around to looking at it yet, but here are The crash happens in win32/perlhost.c on line 1727: 1722: EAX = 00000002 EBX = 0014014C ECX = 00000000 00000008 = ???????? I have no idea how this might relate to the change triggering the Cheers, |
From [email protected]I have distilled this down to: .\perl -Dl -e "eval q{fork}" EXECUTING... (-e:0) Entering new RUNOPS level |
From @icerider70On Sat, Mar 31, 2012 at 11:27 PM, Alex Gough <alex@earth.li> wrote:
<output showing panic snipped> For comparison, here's the output of the same command when run against a EXECUTING... (-e:0) Entering new RUNOPS level |
From @khwilliamsonAttached is a diff file between the before/after with xterm color |
From @khwilliamsonwin32.diff EXECUTING...
(-e:0) Entering new RUNOPS level
4,9c4,9
< (-e:0) ENTER "block" scope 2 (savestack=0) at ..\pp_ctl.c:�[30;46m2116�[0m
< (-e:0) CX 0 PUSH BLOCK (scope 2,2) at ..\pp_ctl.c:�[30;46m2119�[0m
< (-e:1) ENTER "eval" scope 3 (savestack=3) at ..\pp_ctl.c:�[30;46m4208�[0m
< (-e:1) CX 1 PUSH EVAL (scope 3,3) at ..\pp_ctl.c:�[30;46m4239�[0m
< (�[30;46m(eval 1)�[0m:1) �[30;46m �[0mENTER "evalcomp" scope 4 (savestack=�[30;46m48�[0m) at ..\pp_ctl.c:�[30;46m3528�[0m
< ((eval 1):1) ENTER scope 5 (savestack=53) at ..\perly.c:�[30;46m362�[0m
---
> (-e:0) ENTER "block" scope 2 (savestack=0) at ..\pp_ctl.c:�[30;43m2135�[0m
> (-e:0) CX 0 PUSH BLOCK (scope 2,2) at ..\pp_ctl.c:�[30;43m2138�[0m
> (-e:1) ENTER "eval" scope 3 (savestack=3) at ..\pp_ctl.c:�[30;43m4288�[0m
> (-e:1) CX 1 PUSH EVAL (scope 3,3) at ..\pp_ctl.c:�[30;43m4319�[0m
> (�[30;43m-e�[0m:1) ENTER "evalcomp" scope 4 (savestack=�[30;43m45�[0m) at ..\pp_ctl.c:�[30;43m3594�[0m
> ((eval 1):1) ENTER scope 5 (savestack=53) at ..\perly.c:�[30;43m358�[0m
((eval 1):2) savestack: releasing items 89 -> 73
11,17c11,19
< ((eval 1):2) ENTER scope 6 (savestack=�[30;46m73�[0m) at op.c:�[30;46m9869�[0m
< ((eval 1):2) LEAVE scope �[30;46m6�[0m (savestack=�[30;46m78�[0m) at op.c:�[30;46m10284�[0m
< ((eval 1):2) savestack: releasing items �[30;46m78�[0m -> �[30;46m73�[0m
< ((eval 1):2) ENTER scope �[30;46m6�[0m (savestack=�[30;46m73�[0m) at op.c:�[30;46m1462�[0m
< ((eval 1):2) LEAVE scope �[30;46m6�[0m (savestack=�[30;46m76�[0m) at op.c:�[30;46m1467�[0m
< ((eval 1):2) savestack: releasing items �[30;46m76�[0m -> �[30;46m73�[0m
< ((eval 1):2) LEAVE scope 5 (savestack=73) at ..\perly.c:�[30;46m723�[0m
---
> ((eval 1):2) ENTER scope 6 (savestack=�[30;43m75) at op.c:2797�[0m
> �[30;43m((eval 1):2) ENTER scope 7 (savestack=75�[0m) at op.c:�[30;43m9969�[0m
> ((eval 1):2) LEAVE scope �[30;43m7�[0m (savestack=�[30;43m80�[0m) at op.c:�[30;43m10420�[0m
> ((eval 1):2) savestack: releasing items �[30;43m80�[0m -> �[30;43m75�[0m
> ((eval 1):2) ENTER scope �[30;43m7�[0m (savestack=�[30;43m75�[0m) at op.c:�[30;43m1501�[0m
> ((eval 1):2) LEAVE scope �[30;43m7�[0m (savestack=�[30;43m78�[0m) at op.c:�[30;43m1506�[0m
> ((eval 1):2) savestack: releasing items �[30;43m78�[0m -> �[30;43m75�[0m
> �[30;43m((eval 1):2) LEAVE scope 6 (savestack=75) at op.c:2800�[0m
> ((eval 1):2) LEAVE scope 5 (savestack=73) at ..\perly.c:�[30;43m719�[0m
((eval 1):2) savestack: releasing items 73 -> 53
19,35c21,27
< ((eval 1):2) LEAVE "evalcomp" scope 4 (savestack=53) at ..\pp_ctl.c:�[30;46m3577�[0m
< ((eval 1):2) savestack: releasing items 53 -> �[30;46m48�[0m
< ((eval 1):2) CX 1 POP EVAL (scope 3,3) at ..\pp_ctl.c:�[30;46m4297�[0m
< (-e:1) LEAVE "eval" scope 3 (savestack=�[30;46m50�[0m) at ..\pp_ctl.c:�[30;46m4325�[0m
< (-e:1) savestack: releasing items �[30;46m50�[0m -> 3
< (�[30;46m(eval 1):2) JUMPENV_PUSH level=1 at perlhost.h:1739�[0m
< �[30;46m((eval 1):2) Entering new RUNOPS level�[0m
< �[30;46m((eval 1):2) CX 1 POP EVAL (scope 3,3) at ..\pp_ctl.c:4297�[0m
< �[30;46m(-e:1) LEAVE "eval" scope 3 (savestack=50) at ..\pp_ctl.c:4325�[0m
< �[30;46m(-e:1) savestack: releasing items 50 -> 3�[0m
< �[30;46m(-e:1) CX 0 POP BLOCK (scope 2,2) at ..\pp_ctl.c:2137�[0m
< �[30;46m((eval 1):0) LEAVE "block" scope 2 (savestack=3) at ..\pp_ctl.c:2145�[0m
< �[30;46m((eval 1):0) savestack: releasing items 3 -> 0�[0m
< �[30;46m((eval 1):0) leaving RUNOPS level�[0m
< �[30;46m((eval 1):0) JUMPENV_POP level=1 at perlhost.h:1780�[0m
< �[30;46m(�[0m-e:1) CX 0 POP BLOCK (scope 2,2) at ..\pp_ctl.c:�[30;46m2137�[0m
< (-e:0) LEAVE "block" scope 2 (savestack=3) at ..\pp_ctl.c:�[30;46m2145�[0m
---
> ((eval 1):2) LEAVE "evalcomp" scope 4 (savestack=53) at ..\pp_ctl.c:�[30;43m3722�[0m
> ((eval 1):2) savestack: releasing items 53 -> �[30;43m45�[0m
> ((eval 1):2) CX 1 POP EVAL (scope 3,3) at ..\pp_ctl.c:�[30;43m4378�[0m
> (-e:1) LEAVE "eval" scope 3 (savestack=�[30;43m47�[0m) at ..\pp_ctl.c:�[30;43m4407�[0m
> (-e:1) savestack: releasing items �[30;43m47�[0m -> 3
> (-e:1) CX 0 POP BLOCK (scope 2,2) at ..\pp_ctl.c:�[30;43m2156�[0m
> (-e:0) LEAVE "block" scope 2 (savestack=3) at ..\pp_ctl.c:�[30;43m2164�[0m
(-e:0) savestack: releasing items 3 -> 0
(-e:0) leaving RUNOPS level
38,40c30,37
< (-e:0) JUMPENV_JUMP(2) level=1 at perl.c:�[30;46m4920�[0m
< (-e:0) JUMPENV_POP level=1 at perl.c:�[30;46m2330�[0m
< (-e:�[30;46m0�[0m) LEAVE scope �[30;46m1�[0m (savestack=�[30;46m0�[0m) at �[30;46mperl�[0m.c:�[30;46m570�[0m
---
> (-e:0) JUMPENV_JUMP(2) level=1 at perl.c:�[30;43m4951�[0m
> (-e:0) JUMPENV_POP level=1 at perl.c:�[30;43m2347�[0m
> �[30;43m((eval 1):2) (dopoptoeval(): found eval at cx=1)�[0m
> �[30;43m((eval 1):2) CX 1 POP EVAL (scope 3,3) at ..\pp_ctl.c:1747�[0m
> (-e:�[30;43m1�[0m) LEAVE scope �[30;43m3�[0m (savestack=�[30;43m47�[0m) at �[30;43m..\pp_ctl.c:1765�[0m
> �[30;43m(-e:1) savestack: releasing items 47 -> 3�[0m
> �[30;43m(-e:1) JUMPENV_JUMP(3) level=0 at ..\pp_ctl�[0m.c:�[30;43m1795�[0m
> �[30;43mpanic: top_env, v=3�[0m
|
From @bulk88I did some thinking on this bug. I made a macro expanded Perl_die_unwind callstack of **CHILD** OS thread, the die_unwind is my version, so line
______________________________________________________ It seems to me the bug is that this line (look in the die_unwind.c Debugger shows this. - Itop_env 0x00908044 {je_prev=0x00000000 {je_prev=??? je_buf=0x00000004 I'll guess the longjmp info is never collected. Platform: Characteristics of this binary (from libperl): |
From @bulk88void
Perl_die_unwind (PerlInterpreter * my_perl, SV * msv)
{
extern int Perl___notused (void);
SV *exceptsv = Perl_sv_mortalcopy (my_perl, msv);
U8 in_eval = (my_perl->Iin_eval);
(void) ((msv) || (_assert ("msv", "..\\pp_ctl.c", 1676), 0));
if (in_eval)
{
I32 cxix;
I32 gimme;
/*
* Historically, perl used to set ERRSV ($@) early in the die
* process and rely on it not getting clobbered during unwinding.
* That sucked, because it was liable to get clobbered, so the
* setting of ERRSV used to emit the exception from eval{} has
* been moved to much later, after unwinding (see just before
* JMPENV_JUMP below). However, some modules were relying on the
* early setting, by examining $@ during unwinding to use it as
* a flag indicating whether the current unwinding was caused by
* an exception. It was never a reliable flag for that purpose,
* being totally open to false positives even without actual
* clobberage, but was useful enough for production code to
* semantically rely on it.
*
* We'd like to have a proper introspective interface that
* explicitly describes the reason for whatever unwinding
* operations are currently in progress, so that those modules
* work reliably and $@ isn't further overloaded. But we don't
* have one yet. In its absence, as a stopgap measure, ERRSV is
* now *additionally* set here, before unwinding, to serve as the
* (unreliable) flag that it used to.
*
* This behaviour is temporary, and should be removed when a
* proper way to detect exceptional unwinding has been developed.
* As of 2010-12, the authors of modules relying on the hack
* are aware of the issue, because the modules failed on
* perls 5.13.{1..7} which had late setting of $@ without this
* early-setting hack.
*/
if (!(in_eval & 4))
{
((exceptsv)->sv_flags &= ~0x00080000);
Perl_sv_setsv_flags (my_perl,
(*
((0 +
((my_perl->Ierrgv))->sv_u.svu_gp)->gp_sv ? &((0 +
((my_perl->Ierrgv))->
sv_u.svu_gp)->
gp_sv) : &((0 +
(Perl_gv_add_by_type
(my_perl,
((my_perl->Ierrgv)), SVt_NULL))->sv_u.svu_gp)->gp_sv))), exceptsv, 2 | 512 | 1024);
}
while ((cxix = S_dopoptoeval (my_perl, ((my_perl->Icurstackinfo)->si_cxix))) < 0
&& (my_perl->Icurstackinfo)->si_prev)
{
Perl_dounwind (my_perl, -1);
do
{
SV **sp = (my_perl->Istack_sp);
PERL_SI *const prev = (my_perl->Icurstackinfo)->si_prev;
if (((my_perl->Idebug) & 0x00000004))
{
int i = -1;
PERL_SI *p = (my_perl->Icurstackinfo);
while (p)
{
i++;
p = p->si_prev;
}
Perl_deb (my_perl, "pop STACKINFO %d at %s:%d\n", i, "..\\pp_ctl.c", 1720);
}
if (!prev)
{
PerlIO_printf (((my_perl->Istderrgv)
&& (((svtype) (((my_perl->Istderrgv))->sv_flags & 0xff)) ==
SVt_PVGV)
&& ((0 + ((my_perl->Istderrgv))->sv_u.svu_gp)->gp_io)
&&
((XPVIO
*) (((0 +
((my_perl->Istderrgv))->sv_u.svu_gp)->gp_io))->sv_any)->
xio_ofp
? ((XPVIO
*) (((0 +
((my_perl->Istderrgv))->sv_u.svu_gp)->gp_io))->
sv_any)->xio_ofp : Perl_PerlIO_stderr (my_perl)),
"panic: POPSTACK\n");
Perl_my_exit (my_perl, 1);
}
do
{
((XPVAV *) ((my_perl->Icurstack))->sv_any)->xav_fill =
sp - (my_perl->Istack_base);
(my_perl->Istack_base) = ((prev->si_stack)->sv_u.svu_array);
(my_perl->Istack_max) =
(my_perl->Istack_base) + ((XPVAV *) (prev->si_stack)->sv_any)->xav_max;
sp = (my_perl->Istack_sp) =
(my_perl->Istack_base) + ((XPVAV *) (prev->si_stack)->sv_any)->xav_fill;
(my_perl->Icurstack) = prev->si_stack;
}
while (0);
(my_perl->Icurstackinfo) = prev;
}
while (0);
}
if (cxix >= 0)
{
I32 optype;
SV *namesv;
PERL_CONTEXT *cx;
SV **newsp;
COP *oldcop;
JMPENV *restartjmpenv;
OP *restartop;
if (cxix < ((my_perl->Icurstackinfo)->si_cxix))
Perl_dounwind (my_perl, cxix);
if (((my_perl->Idebug) & 0x00000004))
Perl_deb (my_perl, "CX %ld %s %s (scope %ld,%ld) at %s:%d\n",
(long) ((my_perl->Icurstackinfo)->si_cxix), "POP",
PL_block_type[((&((my_perl->Icurstackinfo)->si_cxstack)
[((my_perl->Icurstackinfo)->si_cxix)])->cx_u.cx_subst.
sbu_type & 0xf)], (long) (my_perl->Iscopestack_ix),
(long) (((my_perl->Icurstackinfo)->
si_cxstack)[((my_perl->Icurstackinfo)->si_cxix)].cx_u.cx_blk.
blku_oldscopesp), "..\\pp_ctl.c", 1735);;
cx = &((my_perl->Icurstackinfo)->si_cxstack)[((my_perl->Icurstackinfo)->si_cxix)--], newsp =
(my_perl->Istack_base) + cx->cx_u.cx_blk.blku_oldsp, (my_perl->Icurcop) =
cx->cx_u.cx_blk.blku_oldcop, (my_perl->Imarkstack_ptr) =
(my_perl->Imarkstack) + cx->cx_u.cx_blk.blku_oldmarksp, (my_perl->Iscopestack_ix) =
cx->cx_u.cx_blk.blku_oldscopesp, (my_perl->Icurpm) = cx->cx_u.cx_blk.blku_oldpm, gimme =
cx->cx_u.cx_blk.blku_gimme;;
if (((cx)->cx_u.cx_subst.sbu_type & 0xf) != 10)
{
STRLEN msglen;
const char *message =
(((my_perl->ISv) =
(exceptsv)),
((((my_perl->ISv))->sv_flags & (0x00000400)) ==
0x00000400 ? ((msglen = ((XPV *) ((my_perl->ISv))->sv_any)->xpv_cur),
((const char *) (0 +
((my_perl->ISv))->sv_u.
svu_pv))) : (const char *)
Perl_sv_2pv_flags (my_perl, (my_perl->ISv), &msglen, 2 | 32)));
Perl_PerlIO_write (my_perl,
((my_perl->Istderrgv)
&& (((svtype) (((my_perl->Istderrgv))->sv_flags & 0xff)) ==
SVt_PVGV)
&& ((0 + ((my_perl->Istderrgv))->sv_u.svu_gp)->gp_io)
&&
((XPVIO *) (((0 + ((my_perl->Istderrgv))->sv_u.svu_gp)->gp_io))->
sv_any)->
xio_ofp
? ((XPVIO
*) (((0 +
((my_perl->Istderrgv))->sv_u.svu_gp)->gp_io))->sv_any)->
xio_ofp : Perl_PerlIO_stderr (my_perl)),
(const char *) "panic: die ", 11);
Perl_PerlIO_write (my_perl,
((my_perl->Istderrgv)
&& (((svtype) (((my_perl->Istderrgv))->sv_flags & 0xff)) ==
SVt_PVGV)
&& ((0 + ((my_perl->Istderrgv))->sv_u.svu_gp)->gp_io)
&&
((XPVIO *) (((0 + ((my_perl->Istderrgv))->sv_u.svu_gp)->gp_io))->
sv_any)->
xio_ofp
? ((XPVIO
*) (((0 +
((my_perl->Istderrgv))->sv_u.svu_gp)->gp_io))->sv_any)->
xio_ofp : Perl_PerlIO_stderr (my_perl)), message, msglen);
Perl_my_exit (my_perl, 1);
}
do
{
(my_perl->Iin_eval) = (((cx)->cx_u.cx_blk.blku_u16) & 0x7F);
optype = (((cx)->cx_u.cx_blk.blku_u16) >> 7);
(my_perl->Ieval_root) = cx->cx_u.cx_blk.blk_u.blku_eval.old_eval_root;
if (cx->cx_u.cx_blk.blk_u.blku_eval.old_namesv)
Perl_sv_2mortal (my_perl, cx->cx_u.cx_blk.blk_u.blku_eval.old_namesv);
}
while (0);
namesv = cx->cx_u.cx_blk.blk_u.blku_eval.old_namesv;
oldcop = cx->cx_u.cx_blk.blku_oldcop;
restartjmpenv = cx->cx_u.cx_blk.blk_u.blku_eval.cur_top_env;
restartop = cx->cx_u.cx_blk.blk_u.blku_eval.retop;
if (gimme == 2)
*++newsp = &(my_perl->Isv_undef);
(my_perl->Istack_sp) = newsp;
do
{
if (((my_perl->Idebug) & 0x00000004))
Perl_deb (my_perl, "%s scope %ld (savestack=%ld) at %s:%d\n", "LEAVE",
(long) (my_perl->Iscopestack_ix), (long) (my_perl->Isavestack_ix),
"..\\pp_ctl.c", 1753);
Perl_pop_scope (my_perl);
}
while (0);
/* LEAVE could clobber PL_curcop (see save_re_context())
* XXX it might be better to find a way to avoid messing with
* PL_curcop in save_re_context() instead, but this is a more
* minimal fix --GSAR */
(my_perl->Icurcop) = oldcop;
if (optype == OP_REQUIRE)
{
(void) ((SV **)
Perl_hv_common_key_len (my_perl,
(((0 + ((my_perl->Iincgv))->sv_u.svu_gp)->gp_hv ? (0 +
((my_perl->Iincgv))->sv_u.svu_gp)->gp_hv : (0 + (Perl_gv_add_by_type (my_perl, ((my_perl->Iincgv)), SVt_PVHV))->sv_u.svu_gp)->gp_hv)), (((const char *) (0 + (namesv)->sv_u.svu_pv))), (((namesv)->sv_flags & 0x20000000) ? -(I32) ((XPV *) (namesv)->sv_any)->xpv_cur : (I32) ((XPV *) (namesv)->sv_any)->xpv_cur), (0x04 | 0x20), (&(my_perl->Isv_undef)), (0)));
/* note that unlike pp_entereval, pp_require isn't
* supposed to trap errors. So now that we've popped the
* EVAL that pp_require pushed, and processed the error
* message, rethrow the error */
Perl_croak (my_perl, "%" "-p" "Compilation failed in require",
((void *) (exceptsv ? exceptsv :
Perl_newSVpvn_flags (my_perl, ("" "Unknown error\n" ""),
(sizeof ("Unknown error\n") - 1),
0x00080000))));
}
if (in_eval & 4)
{
Perl_ck_warner (my_perl, (12), "\t(in cleanup) %" "-p", ((void *) (exceptsv)));
}
else
{
Perl_sv_setsv_flags (my_perl,
(*
((0 +
((my_perl->Ierrgv))->sv_u.svu_gp)->gp_sv ? &((0 +
((my_perl->
Ierrgv))->
sv_u.svu_gp)->
gp_sv) : &((0 +
(Perl_gv_add_by_type
(my_perl,
((my_perl->Ierrgv)), SVt_NULL))->sv_u.svu_gp)->gp_sv))), exceptsv, 2 | 512 | 1024);
}
(my_perl->Irestartjmpenv) = restartjmpenv;
(my_perl->Irestartop) = restartop;
do
{
if (((my_perl->Idebug) & 0x00000004))
{
int i = -1;
JMPENV *p = (my_perl->Itop_env);
while (p)
{
i++;
p = p->je_prev;
}
Perl_deb (my_perl, "JUMPENV_JUMP(%d) level=%d at %s:%d\n", (int) 3, i,
"..\\pp_ctl.c", 1783);
}
(void) 0;
if ((my_perl->Itop_env)->je_prev)
longjmp ((((my_perl->Itop_env)->je_buf)), (((3))));
if ((3) == 2)
PerlProc_exit((my_perl->Istatusvalue));
PerlIO_printf (Perl_PerlIO_stderr (my_perl), "panic: top_env, v=%d\n", (int) 3);
PerlProc_exit((1));
}
while (0);
/* NOTREACHED */
}
}
Perl_write_to_stderr (my_perl, exceptsv);
Perl_my_failure_exit (my_perl);
/* NOTREACHED */
} |
From @bulk88 |
From @bulk88forgot to add, the test program the above post was done with is "-e |
From @bulk88On Sun Apr 08 11:45:45 2012, bulk88 wrote:
# define ASSERT_CURPAD_ACTIVE(label) \ |
From @bulk88 |
From @bulk88On Sun Apr 08 12:30:34 2012, bulk88 wrote:
On my perl 5.12, curpad and comppad are non-null at the beginning ( At At I might research it more today, or not, IDK. If someone is else is |
From @bulk88On Sun Apr 08 13:17:36 2012, bulk88 wrote: In 5.12, curpad is added with the following callstack.
At this point, On entry to perl_clone_using On entry to pp_fork at This is now an opcode problem. _____________________________________________
|
From @cpansproutOn Sun Apr 08 13:17:36 2012, bulk88 wrote:
Thank you very much for researching this. I’m afraid I don’t have -- Father Chrysostomos |
From @bulk88On perl 5.12 PP(pp_entereval) opcode sets compcv. On perl 5.15 it doesn't. entereval calls, S_doeval. On 5.15, at, hmm, head git 5.15 doesn't match DEBUG_x(dump_eval()); In both 5.12 and 5.15, startop is null pointer on entry and remains |
From @bulk88Here is where in LEAVE_with_name compcv is set to null. I guess a NULL |
From @bulk88 |
From @bulk88On Sun Apr 08 15:12:29 2012, bulk88 wrote:
compcv is null on entry to S_doeval in 5.15 and 5.12. I will guess the bug is either a lack of a extra mortal/scope/save, or |
From @khwilliamsonOn 04/08/2012 04:28 PM, bulk 88 via RT wrote:
Thanks very much for your tracking this down. I'm hopeful that someone karl williamson |
From @rjbsThanks /very much/ for this detective work! It's really appreciated over here. -- |
From @cpansproutOn Sun Apr 08 15:28:23 2012, bulk88 wrote:
The change that caused this crash (see subject) intentionally restored
The purpose of the evalcomp scope (which I added earlier) is to undo Earlier, you wrote:
http://perl5.git.perl.org/perl.git/blob/03d9f026ae253e9e69212a3cf6f1944437e9f070:/sv.c#l13284
http://perl5.git.perl.org/perl.git/blob/03d9f026ae253e9e69212a3cf6f1944437e9f070:/pad.h#l339
That may be the problem. What happens if you apply the attached patch? This is a bit of a stab -- Father Chrysostomos |
From @cpansproutInline Patchdiff --git a/pad.h b/pad.h
index ddde4d7..aa6521f 100644
--- a/pad.h
+++ b/pad.h
@@ -338,7 +338,7 @@ Clone the state variables associated with running and compiling pads.
* sub's CV or padlist. */
#define PAD_CLONE_VARS(proto_perl, param) \
- PL_comppad = MUTABLE_AV(ptr_table_fetch(PL_ptr_table, proto_perl->Icomppad)); \
+ PL_comppad = av_dup(proto_perl->Icomppad, param); \
PL_curpad = PL_comppad ? AvARRAY(PL_comppad) : NULL; \
PL_comppad_name = av_dup(proto_perl->Icomppad_name, param); \
PL_comppad_name_fill = proto_perl->Icomppad_name_fill; \ |
From @janduboisOn Mon, 09 Apr 2012, Father Chrysostomos via RT wrote:
Excellent, this does indeed fix the crashes! Cheers, |
From @cpansproutOn Mon Apr 09 19:59:06 2012, jdb wrote:
I’ve pushed it to the smoke-me/109718 branch. Let’s see what the Believe or not, I’ve not even tried compiling it yet. :-) -- Father Chrysostomos |
From @cpansproutOn Mon Apr 09 20:38:49 2012, sprout wrote:
Could this getppid.t failure have anything to do with it, or is it On Apr 9, 2012, at 9:53 PM, George Greer wrote:
-- Father Chrysostomos |
From @bulk88On Mon Apr 09 18:18:56 2012, sprout wrote:
http://perl5.git.perl.org/perl.git/blob/03d9f026ae253e9e69212a3cf6f1944437e9f070:/sv.c#l13284
http://perl5.git.perl.org/perl.git/blob/03d9f026ae253e9e69212a3cf6f1944437e9f070:/pad.h#l339
I haven't tested your fix. compad becomes the pad in win32_start_child. Perl_set_context(my_perl); ((my_perl->Isys_intern).pseudo_id) = GetCurrentThreadId(); /* push a zero on the stack (we are the child) */ /* continue from next op */ The reason why compad is null/not found in pointer table is because In 5.12, the line that triggered the cloning is PERL_ARGS_ASSERT_SV_DUP; if (!sstr) If compcv is null, sv_dup does nothing, so comppad wont be added to the I will try to run the patch sometime in the next day or 2 and i'll give |
From @iabynOn Mon, Apr 09, 2012 at 06:18:57PM -0700, Father Chrysostomos via RT wrote:
I don't think that's the most correct fix. The intention is that whatever I suspect the correct fix is to ensure the current CV is always cloned; Do you want to run with this, or should I? -- |
From @cpansproutOn Tue Apr 10 04:30:45 2012, davem wrote:
If you are offering to take over, please go ahead. :-) I need to ask the Windows users: Does perl -efork crash? If it doesn’t, can you (Dave Mitchell) explain why not? -- Father Chrysostomos |
From @cpansproutOn Tue Apr 10 03:55:30 2012, bulk88 wrote:
I understood that. I realise I may have been a bit terse.
http://perl5.git.perl.org/perl.git/blob/03d9f026ae253e9e69212a3cf6f1944437e9f070:/sv.c#l13282
http://perl5.git.perl.org/perl.git/blob/e42956688f2e0df936f1a42811962946e4e185bf:/sv.c#l11329
What I was trying to say is that PL_compcv is *supposed* to be null in The code for setting PL_comppad in the child thread was making untenable -- Father Chrysostomos |
From @greergaOn Mon, 9 Apr 2012, Father Chrysostomos via RT wrote:
Probably unrelated as I've seen it before. It's like the tie deepcopy -- |
From @iabynOn Tue, Apr 10, 2012 at 06:04:36AM -0700, Father Chrysostomos via RT wrote:
Whoops, that was silly of me :-)
Because then the currently executing sub is PL_main_cv which is -- |
From @iabynOn Tue, Apr 10, 2012 at 12:21:30PM +0100, Dave Mitchell wrote:
Actually, I misread a bit of code in cx_dup(); the CV *is* duplicated in -- |
From @bulk88The av_dup patch worked for me. The getppid test isn't done on windows. |
From @cpansproutOn Tue Apr 10 07:08:11 2012, davem wrote:
I’ve applied it as 253649d. -- Father Chrysostomos |
@cpansprout - Status changed from 'open' to 'resolved' |
From @cpansproutThis ticket might not be completely resolved yet. In <612945.556640625-sendEmail@hpwin7>, Steve Hay’s smoke report says: Failures: (common-args) -DCCTYPE=MSVC100 Steve, are you able to find out when this particular failure started? I -- Father Chrysostomos |
From @steve-m-hayOn 11 April 2012 22:11, Father Chrysostomos via RT
Not easily. I've only recently restarted smoking again after a long I do notice that smokes from me before the one above were failing In the absence of much recent smoke history on this machine, I have |
From @kmxFYI: here is how goes ./t/op/fork.t on Windows 7 + gcc-4.4.7/32bit - tested op/fork.t ......................................................... 23/? PROG: No crash, just the one failure (which AFAIK exists some time and is related -- |
Migrated from rt.perl.org#109718 (status was 'resolved')
Searchable as RT109718$
The text was updated successfully, but these errors were encountered: