-
Notifications
You must be signed in to change notification settings - Fork 555
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
fix for SEGV in pp_leavesub #648
Comments
From roconnor@world.std.comThe following code gets "Segmentation fault (core dumped)": #! /usr/bin/perl -w "Mytest" can either be Tk or the following xs code, which is intended #ifdef __cplusplus The same thing happens with 5.004_04, 5.005_03, and perl.5005_61. I spent some time tracking this down, and I believe that the problem When the callback executes the "my $t;", it does a SAVECLEARSV, which The obvious solution would seem to be not to decrement the refcnt on I considered other possibilities. Perhaps a sub should not be destroying the only reference to itself. Perhaps we should not be putting references to curpad on the Perhaps SAVECLEARSV should increment a refcnt. But the one The PUSHBLOCK/PUSHSUB was done after the ENTER in pp_entersub, so to Guillaume Curtil <gui@curtil.rez-gif.supelec.fr> reported what I Alan Lehotsky <lehotsky@phosgene.lex.rational.com> on 1999/07/06 in In my patch, I didn't just move POPSUB2 after LEAVE, because it seemed The patch should be fairly safe, because in the normal case (when the The patch is a unified diff against 4.004_04 with only one line of begin 644 patch.gz Perl Info
|
From [Unknown Contact. See original ticket]root writes:
I do not see any mortalization here. This indicates that the code is Ilya |
From [Unknown Contact. See original ticket]Ilya writes:
Here is a better test case: #! /usr/bin/perl -w And the xs code that goes with it: #ifdef __cplusplus I built perl5.004_04 with optimize='-g' and -lmcheck added to the Here is the traceback: #0 0x80cab2c in Perl_leave_scope (base=17) at scope.c:599 When I apply the patch I sent, there is no segfault. Here is the information for the perl I used for the traceback: Site configuration information for perl 5.00404: Configured by root at Tue Sep 21 18:19:48 EDT 1999. Summary of my perl5 (5.0 patchlevel 4 subversion 4) configuration: Locally applied patches: @INC for perl 5.00404: Environment for perl 5.00404: Russ |
From [Unknown Contact. See original ticket]Russell O'Connor <roconnor@world.std.com> writes:
I do see the problem with real-Tk, but suicidal buttons, called outside
G_NOARGS is not apporpriate. And all Tk callbacks are called with G_EVAL, ENTER; -- |
From [Unknown Contact. See original ticket]Nick Ing-Simmons writes:
Agreed. The peculiarities were to simplify the test case. Make this --- balloon.pl.0 Thu Sep 17 21:07:17 1998
Yes. -- |
From @gsarOn Fri, 24 Sep 1999 12:06:53 EDT, "Russell O'Connor" wrote:
The problem you have identified is real. I'll look at your fix to Sarathy |
From [Unknown Contact. See original ticket]Russell O'Connor <roconnor@world.std.com> writes:
An axcellent idea in general.
What is the 'signature' that causes the problem?
Fine. -- |
From @gsarOn Fri, 24 Sep 1999 18:45:26 BST, Nick Ing-Simmons wrote:
It's the $top->destroy. Sarathy |
From [Unknown Contact. See original ticket]Root <roconnor@world.std.com> writes:
The fix is in perl5.6.0 - and the root cause of the worst cases is But as perl5.005_03 and earlier do NOT have the fix Tk800.020 will The strong fix is to increment REFCNT of CV before passing to perl_call_sv Many thanks for your helpful e-mail (and the fix of course) which showed
So have I :-( - I should pay more attention to the things I have
|
Migrated from rt.perl.org#1521 (status was 'resolved')
Searchable as RT1521$
The text was updated successfully, but these errors were encountered: