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
Panic if 'use strict' and forget 'my' #10135
Comments
From @khwilliamsonThis is a bug report for perl from khw@khw-desktop.nonet, This program causes a panic in blead. It is a regression from 5.10.0: use strict; Flags: Site configuration information for perl 5.11.4: Configured by khw at Sat Jan 23 13:32:28 MST 2010. Summary of my perl5 (revision 5 version 11 subversion 4) configuration: Locally applied patches: @INC for perl 5.11.4: Environment for perl 5.11.4: PATH=/home/khw/bin:/home/khw/print/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/usr/games:/opt/real/RealPlayer:/home/khw/cxoffice/bin |
From @iabynOn Sat, Feb 06, 2010 at 04:36:46PM -0800, karl williamson wrote:
Does this still happen with your \N{...} patch applied? -- |
The RT System itself - Status changed from 'new' to 'open' |
From @nwc10On Sat, Feb 06, 2010 at 04:36:46PM -0800, karl williamson wrote:
Specifically, this panic: panic: top_env Nicholas Clark |
From @khwilliamsonDave Mitchell wrote:
No panic, but it still doesn't work properly: Use of uninitialized value $txt in pattern match (m//) at $txt should have been initialized in the statement at line 113: I did change Name.pl to include a closure to fix a bug in the future. Use of uninitialized value $txt in pattern match (m//) at valgrind shows no problems. My guess now is that because of the missing 'my', something doesn't get So, is this a 5.12 stopper? |
From @rgarciaOn 8 February 2010 05:08, karl williamson <public@khwilliamson.com> wrote:
I agree with the analysis.
This is severely hampering error reporting. And having perl segfault |
From @khwilliamsonRafael Garcia-Suarez wrote:
I should have phrased the above sentence: "I'm not sure if the bug is
|
From @obra
Done. We now have 7 blockers. |
From @rgarciaOn 9 February 2010 17:11, Jesse Vincent <jesse@fsck.com> wrote:
Fixed (or worked around) by : commit 78c4a74 [perl #72590] Panic if 'use strict' and forget 'my' That bug happens when we detect a compilation error in the statement This patch does not attempt to fix the whole error-reporting process; Inline Patchdiff --git a/regcomp.c b/regcomp.c
index ecea32d..0b27364 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -6722,6 +6722,9 @@ S_reg_namedseq(pTHX_ RExC_state_t *pRExC_state, UV *valuep
if ( he_str ) {
sv_str = HeVAL(he_str);
cached = 1;
+ } else if (PL_parser && PL_parser->error_count > 0) {
+ /* Don't attempt to load charnames if we're already in error */
+ vFAIL("Too many errors, cannot continue parsing");
} else {
dSP ; |
@rgs - Status changed from 'open' to 'resolved' |
From @ikegamiOn Thu, Feb 11, 2010 at 4:38 AM, Rafael Garcia-Suarez <rgs@consttype.org>wrote:
Since any error is too many errors, isn't that message misleading? |
From @rgarciaOn 11 February 2010 19:53, Eric Brine <ikegami@adaelis.com> wrote:
Possibly, but perl can report many errors at once: $ perl -Mstrict -e '$x,$y' The message points out that it has already reported one (or many) |
From @khwilliamsonRafael Garcia-Suarez via RT wrote:
Note that this patch only affects the regex use of \N, not the double But, if we move the \N processing entirely to the lexer for 5.12, the |
From @rgarciaOn 14 February 2010 04:53, karl williamson <public@khwilliamson.com> wrote:
That's because unicore/Name.pl fails to load, actually, and doesn't $ bleadperl -Mstrict -Mcharnames=:full -e '$x="\N{LATIN CAPITAL LETTER A}"' With the small patch below, we have a "nicer" message : --- a/lib/charnames.pm ## @off will hold the index into the code/name string of the start and While it's better to check for error, in this case, the load failure
|
Migrated from rt.perl.org#72590 (status was 'resolved')
Searchable as RT72590$
The text was updated successfully, but these errors were encountered: