-
Notifications
You must be signed in to change notification settings - Fork 560
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
WG: DESTROY() interferes with die() #31
Comments
From Richard.Foley@m.dasa.deCreated by dean@brettle.comThis report has been registered with perlbug. Von: perlbug@perl.org [mailto:perlbug@perl.org] This email address is for reporting bugs to the perl community via This is a bug report for perl from dean@brettle.com, ----------------------------------------------------------------- Hi all, Here is a little perl which illustrates the problem. Commentary package C; sub new { sub DESTROY { eval { if ($@) { Here is what is going on: 0. We eval some code, expecting to catch errors. 1. We create a C in some scope within the eval. In our example the 2. Later in the scope, we die. This sets $@ and goes to the next line 3. When Perl exits the scope, it invokes C->DESTROY() to clean up our 4. C->DESTROY() happens to contain an eval which doesn't die(). This 5. When we check $@ after our eval, it's empty. :-( This is a *really* evil bug because it means that anytime you create an This bug was discussed approximately 1 year ago. Here's a link to the http://x43.deja.com/getdoc.xp?AN=389699069&CONTEXT=926789340.1861025869 I've found the bug in 5.004_04, 5.004_05 (both i386-linux), and FWIW, I've run into this twice in the last 2 weeks. In both cases, I # "carefully BLOCK LIST" executes BLOCK (with @_ = LIST) without # die $new_err if ( Any idea when the die/DESTROY bug will be fixed? Many thanks to all of you for all the time and energy you put into perl! Cheers, --Dean +--------------------------------------------------------------------+ Perl Info
|
From [Unknown Contact. See original ticket]Created by dean@brettle.comPerlbugtron missed this, I shall fix this immediately. This report has been registered with perlbug. Von: perlbug@perl.org [mailto:perlbug@perl.org] This email address is for reporting bugs to the perl community via This is a bug report for perl from dean@brettle.com, ----------------------------------------------------------------- Hi all, Here is a little perl which illustrates the problem. Commentary package C; sub new { sub DESTROY { eval { if ($@) { Here is what is going on: 0. We eval some code, expecting to catch errors. 1. We create a C in some scope within the eval. In our example the 2. Later in the scope, we die. This sets $@ and goes to the next line 3. When Perl exits the scope, it invokes C->DESTROY() to clean up our 4. C->DESTROY() happens to contain an eval which doesn't die(). This 5. When we check $@ after our eval, it's empty. :-( This is a *really* evil bug because it means that anytime you create an This bug was discussed approximately 1 year ago. Here's a link to the http://x43.deja.com/getdoc.xp?AN=389699069&CONTEXT=926789340.1861025869 I've found the bug in 5.004_04, 5.004_05 (both i386-linux), and FWIW, I've run into this twice in the last 2 weeks. In both cases, I # "carefully BLOCK LIST" executes BLOCK (with @_ = LIST) without # die $new_err if ( Any idea when the die/DESTROY bug will be fixed? Many thanks to all of you for all the time and energy you put into perl! Cheers, --Dean +--------------------------------------------------------------------+ Perl Info
|
From [Unknown Contact. See original ticket]Perl 5.6 will fix this. die() within DESTROY() is turned into Thanks for your bug report, Nat |
fixes Perl#19239 Ideally a new release of Win32 will be released, but it'd hard to tell when that will happen, since it may be waiting on Perl#30
fixes Perl#19239 Ideally a new release of Win32 will be released, but it's hard to tell when that will happen, since it may be waiting on Perl#30. So fix this in core for now to clean up CI results.
Fix ups for README
2.209 26 February 2024 * version 2.209 Mon Feb 26 15:54:39 2024 +0000 b8c062949b7e89a2f1643825f6b66f79b2ba3b68 * #31 Fix build failure with "c++-compat" warnings Mon Feb 26 15:20:07 2024 +0000 d9af6f896accf755fa1ef486cf128fdf66314213
Migrated from rt.perl.org#831 (status was 'resolved')
Searchable as RT831$
The text was updated successfully, but these errors were encountered: