-
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
dtrace sub-entry probe against lexical sub segfaults #13014
Comments
From @rjbsCreated by @rjbsI have compiled blead (929c6ec) -Dusedtrace and run: ./perl -Ilib -E 'use feature "lexical_subs"; my sub x { say 1 } This starts emitting a slow steady stream of ones. It is just fine. After a while, I run: sudo dtrace -Zn 'perl::sub-entry /execname == "perl"/ { }' The original perl program segfaults within a second. Perl Info
|
From @cpansproutOn Tue Jun 04 11:48:38 2013, rjbs wrote:
The attached patch seems to do the trick. I don’t know dtrace well $ sudo ./perl t/harness run/dtrace.t Test Summary Report run/dtrace.t (Wstat: 0 Tests: 9 Failed: 1) Sometimes two tests fail. It seems to have to do with run/dtrace.pl -- Father Chrysostomos |
From @cpansproutInline Patchdiff --git a/cop.h b/cop.h
index 94a1267..122e2d7 100644
--- a/cop.h
+++ b/cop.h
@@ -581,7 +581,9 @@ struct block_format {
* decremented by LEAVESUB, the other by LEAVE. */
#define PUSHSUB_BASE(cx) \
- ENTRY_PROBE(GvENAME(CvGV(cv)), \
+ ENTRY_PROBE(CvNAMED(cv) \
+ ? HEK_KEY(CvNAME_HEK(cv)) \
+ : GvENAME(CvGV(cv)), \
CopFILE((const COP *)CvSTART(cv)), \
CopLINE((const COP *)CvSTART(cv)), \
CopSTASHPV((const COP *)CvSTART(cv))); \
@@ -646,7 +648,9 @@ struct block_format {
#define POPSUB(cx,sv) \
STMT_START { \
- RETURN_PROBE(GvENAME(CvGV((const CV*)cx->blk_sub.cv)), \
+ RETURN_PROBE(CvNAMED(cx->blk_sub.cv) \
+ ? HEK_KEY(CvNAME_HEK(cx->blk_sub.cv)) \
+ : GvENAME(CvGV(cx->blk_sub.cv)), \
CopFILE((COP*)CvSTART((const CV*)cx->blk_sub.cv)), \
CopLINE((COP*)CvSTART((const CV*)cx->blk_sub.cv)), \
CopSTASHPV((COP*)CvSTART((const CV*)cx->blk_sub.cv))); \ |
The RT System itself - Status changed from 'new' to 'open' |
From @cpansproutOn Tue Jun 04 23:40:34 2013, sprout wrote:
I have applied the patch as 88dbe4a, but it still needs tests. -- Father Chrysostomos |
From @rjbsThanks. I had been holding off until I tried writing tests, but I'm happy to see it applied, too. -- |
From @jkeenanOn Fri Jun 21 12:55:56 2013, rjbs wrote:
May I dissent? It seems that whatever test we write will require 'skip unless dtrace Thank you very much. |
From @rjbs* James E Keenan via RT <perlbug-followup@perl.org> [2013-10-02T21:34:09]
It used to segfault. Now it does not. The ticket is still open so that we can -- |
From @jkeenanOn 10/2/13 9:49 PM, Ricardo Signes wrote:
No, I'm suggesting that we not delay in figuring out who can write a |
Migrated from rt.perl.org#118305 (status was 'open')
Searchable as RT118305$
The text was updated successfully, but these errors were encountered: