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
"sub foo :unique" segfaults #7043
Comments
From grazz@pobox.comThis is a bug report for perl from grazz@pobox.com, % perl -e 'sub foo :unique' It seems to blow up here xsutils.c:102: Because the attributes are applied before CvGV(cv) is set. Flags: Site configuration information for perl v5.8.3: Configured by grazz at Sat Jan 17 14:19:04 EST 2004. Summary of my perl5 (revision 5.0 version 8 subversion 3) configuration: Locally applied patches: @INC for perl v5.8.3: Environment for perl v5.8.3: |
From @rgsSteve Grazzini (via RT) wrote:
Does :unique make any sense at all with subroutines anyway? |
The RT System itself - Status changed from 'new' to 'open' |
From @lizmatAt 10:31 +0100 1/19/04, Rafael Garcia-Suarez wrote:
Can't find any documentation in /pod about it. Only about using Liz |
From @rgsElizabeth Mattijsen wrote:
But the internals use a CVf_UNIQUE attribute for code references. I don't really understand the implications of the patch below, but --- xsutils.c (revision 3095) |
From @iabynOn Tue, Jan 20, 2004 at 09:07:55PM +0100, Rafael Garcia-Suarez wrote:
CVf_UNIQUE and GVf_UNIQUE are two separate concepts. The :unique On the the hand, CVf_UNIQUE is simply a flag on the CV saying that it I presume that the real cause of the bug is that CVs are attached to the Ages ago I was working on a patch for this (attach the PL_compcv to the GV I think in the short term, :unique on a sub should just give an error. -- |
From @rgsDave Mitchell wrote:
Indeed -- the name confused me, as Arthur pointed out on IRC.
The documentation about it is rather terse.
I agree. But would your patch solve all problems with :unique subs ? |
From @rgsRafael Garcia-Suarez wrote:
Hmm, that probably a reason for forbidding "my $x:unique" too. |
From @iabynOn Tue, Jan 20, 2004 at 09:59:19PM +0100, Rafael Garcia-Suarez wrote:
Ah yes, I wasn't thinking far enough ahead. It would solve the coredump, I think therefore a C<sub foo:unique> should generate a warning that it -- |
From @lizmatAt 20:51 +0000 1/20/04, Dave Mitchell wrote:
Argh... is that true? ARGH, it IS! use threads;
And in the longer term, I think ":unique" should die altogether... Liz |
From @iabynOn Tue, Jan 20, 2004 at 09:59:19PM +0100, Rafael Garcia-Suarez wrote:
now corrected: -- Change 22185 by davem@davem-percy on 2004/01/20 21:01:08 Document CVf_UNIQUE flag better Affected files ... ... //depot/perl/cv.h#46 edit Differences ... ==== //depot/perl/cv.h#46 (text) ==== @@ -75,7 +75,10 @@ |
From @iabynOn Tue, Jan 20, 2004 at 10:06:09PM +0100, Rafael Garcia-Suarez wrote:
Yuck. -- |
From @rgsDave Mitchell wrote:
You can do it :) (As I'm going to London in two days I'll have less |
From @iabynOn Tue, Jan 20, 2004 at 10:32:24PM +0100, Rafael Garcia-Suarez wrote:
Well, say hello to the city of my childhood for me :-) I've made my/sub : unique fatal compile-time errors as patch #22187. I've +Warning: the current implementation of this attribute operates on the -- |
@iabyn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#24940 (status was 'resolved')
Searchable as RT24940$
The text was updated successfully, but these errors were encountered: