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
pads being reused in coderefs called from DESTROY #13170
Comments
From @doyCreated by @doyGiven this script: sub foo { my $got; $got = $other; $block->(); { sub DESTROY { # "exit(0) unless fork" also triggers the bug, $got is keeping its previous value when foo() is called from the DESTROY commit 840a7b7 Re: [PATCH] The largest hoax of all times? Subject: Re: [PATCH] The largest hoax of all times? Subject: Re: [PATCH] The largest hoax of all times? Fix the unpredictable order of DESTROYs. p4raw-id: //depot/perl@7991 Perl Info
|
From @cpansproutOn Thu Aug 15 16:17:42 2013, doy@tozt.net wrote:
I cannot reproduce this on darwin or linux. -- Father Chrysostomos |
The RT System itself - Status changed from 'new' to 'open' |
From @iabynOn Fri, Aug 16, 2013 at 05:17:33AM -0700, Father Chrysostomos via RT wrote:
I can't reproduce it on linux either. Tried lots of versions, threaded / -- |
From victor@vsespb.ruReproduced under perl 5.10.1 (linux), but only after adding 'use got the following message: (in cleanup) this is clearly a bug at 2.pl line 7. On Thu Aug 15 16:17:42 2013, doy@tozt.net wrote:
5.18/bin:/home/doy/.bin/nethack:/home/doy/.bin:/usr/local/sbin:/usr/local/bin:/usr/lib/ccache/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/vendor_perl:/usr/bin/core_perl
PERLBREW_PATH=/home/doy/perl5/perlbrew/bin:/home/doy/perl5/perlbrew/perls/perl-
|
From @cpansproutOn Fri Aug 16 08:03:36 2013, vsespb wrote:
I get it with warnings, too. It is hard to debug this sort of thing $ ./perl -ILib -w foo (gdb) run Program exited normally. Program exited normally. It exhibits the reported buggy behaviour consistently with no breakpoint. With a breakpoint it runs to completion with no error, fails an So, whose bug *is* this? -- Father Chrysostomos |
From @cpansproutOn Fri Aug 16 08:42:07 2013, sprout wrote:
... debugging stuff ...
I think we can disregard that. It is probably a compiler/debugger If I add ‘warn $$’ to the top of the script at change the fork statement $ ./perl -ILib foo It appears to have something to do with fork’s return value being on the -- Father Chrysostomos |
From @cpansproutOn Fri Aug 16 08:51:24 2013, sprout wrote:
Fatal warnings give me a segmentation violation. That may be another 11623 0x000000010030cec2 in Perl_die_unwind (msv=0x1057f5970) at -- Father Chrysostomos |
From victor@vsespb.ruadding $SIG{__WARN__}=sub{die}; change error message to (in cleanup) (in cleanup) this is clearly a bug 3 9258 at i.e. there is a warning, indeed. On Fri Aug 16 08:55:11 2013, sprout wrote:
|
From @cpansproutOn Fri Aug 16 08:55:11 2013, sprout wrote:
No, actually it has nothing to do with fork. Just call exit(0) and you exit() results in a call to die_unwind in pp_ctl.c, which calls POPSUB, Unwinding the savestack causes the anon sub’s lexicals to be freed
Yes. it is: $ ./perl -Ilib -e 'use warnings FATAL=>"all"; DESTROY{die} bless []; exit' I don’t see an obvious way to fix either of these bugs. -- Father Chrysostomos |
From victor@vsespb.rualso happens even if program is not terminated at all: ... On Sat Aug 17 07:04:37 2013, sprout wrote: |
From @cpansproutOn Sat Aug 17 07:04:37 2013, sprout wrote:
Well I have an idea about the latter. The error in the destructor is We should simply bypass fatal warnings here. In fact, I wonder why this One reason I ask is that changing it only to ignore fatal warnings will (I’m still thinking about the original issue in the ticket. That’s a -- Father Chrysostomos |
From @doyOn Sat, Aug 24, 2013 at 07:38:55PM -0700, Father Chrysostomos via RT wrote:
It's really pretty clear that fatal warnings were never thought through
I think this is a good idea (but yeah, also a separate bug). -doy |
From @cpansproutOn Sat Aug 24 19:58:41 2013, doy@tozt.net wrote:
Implemented on the sprout/fataldestroy branch. I had to change quite a
(I can’t fix, or even diagnose, bugs without finding more. :-) -- Father Chrysostomos |
From @cpansproutOn Sat Aug 17 07:04:37 2013, sprout wrote:
The code in question is spread out all over the place. This piece in /* pop unwanted frames */ if (ix < cxstack_ix) { if (ix < 0) dounwind(ix) causes CvDEPTH to be decreased. LEAVE_SCOPE(oldsave) frees What makes this really tricky is that we cannot simply call LEAVE_SCOPE Trying to disentangle that (and differently for exit/die/die in Maybe what we need to do is put the clearing of lexicals inside POPSUB, This is a mess.... -- Father Chrysostomos |
From @cpansproutOn Sun Aug 25 08:18:03 2013, sprout wrote:
Fixed in commit 2537512. :-) -- Father Chrysostomos |
@mauke - Status changed from 'open' to 'resolved' |
Capture or suppress 'exiting' warnings Former name referred to RT ticket 119311. In the Oct 2019 transfer of tickets to GitHub issues, the old ticket became Perl/perl5#13170. Update MANIFEST
Migrated from rt.perl.org#119311 (status was 'resolved')
Searchable as RT119311$
The text was updated successfully, but these errors were encountered: