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
Perl_yylex(): Assertion `!(((PL_parser->linestr))->sv_flags & 0x10000000)' failed (perl: toke.c:4821) #15741
Comments
From @geeknikTriggered with Perl v5.25.7-26-g7332835. ./perl -e '0<<<<~ Use of bare << to mean <<"" is deprecated at -e line 1. |
From @hvdsThis looks to have been introduced with indented here-docs: I suspect Matthew needs to talk to Father C to understand why we need this: I'm not sure how to debug it: I can't reproduce with the program in a file, and I don't know how to get a newline into command-line arguments in gdb. Shortest reproducer for me is (with 1247 zeroes): Hugo |
The RT System itself - Status changed from 'new' to 'open' |
From @cpansproutOn Fri, 02 Dec 2016 07:26:25 -0800, hv wrote:
Code all over toke.c expects to modify SvPVX(PL_linestr) in place, which cannot be done with COW scalars. It may be that we need to do sv_force_normal where we currently have an assert, though it would be good to know where it’s becoming a COW to begin with.
Have you tried gdb --args ... ? -- Father Chrysostomos |
From @hvdsOn Fri, 02 Dec 2016 09:37:01 -0800, sprout wrote:
Ah, that'll be the one, thanks! Oh, COW is being set on both source and target at S_scan_heredoc:9935: It seems mildly odd in any case to be entering this section with indent_len==0, but I guess it isn't unreasonable if that's what the code asks for. We will need care though: it's by no means obvious to me, for example, that memEQ() with length 0 is portable (and it might be worth a comment to that effect in handy.h, one way or another). Hugo |
From @wolfsageOn Sat, Dec 3, 2016 at 3:28 AM, Hugo van der Sanden via RT
Thanks for digging into this. I'm not sure what the solution is here -- Matthew Horsfall (alh) |
From @demerphqOn 5 December 2016 at 04:05, Matthew Horsfall (alh) <wolfsage@gmail.com> wrote:
Ah shoot. I already encountered this in my COW patch and have a fix The basic problem is that in your code you use sv_setsv(), which COW's. There is also a problem with your code and the existing COW that it uses SvPV_shrink_to_cur(tmpstr); which I think breaks in-string COW. Sorry I didnt push this upstream already. commit a14be3e make sure that new heredoc parsing doesn't COW during prefix strip Yves -- |
From @demerphqOn 5 December 2016 at 11:30, demerphq <demerphq@gmail.com> wrote:
Can I leave it to you to write tests? I can confirm my patch fixes the Yves |
From @demerphqOn 5 December 2016 at 11:39, demerphq <demerphq@gmail.com> wrote:
BTW, to explain: --- a/toke.c The original code is bad because it creates a newSV() from "", and /* Trim leading whitespace */ We use sv_setpvn() from the *contents* of the newstr sv, not Yves -- |
From @wolfsageOn Mon, Dec 5, 2016 at 5:42 AM, demerphq <demerphq@gmail.com> wrote:
Thank you, that's helpful. I'll make a note to try to come up with Cheers, -- Matthew Horsfall (alh) |
Migrated from rt.perl.org#130229 (status was 'open')
Searchable as RT130229$
The text was updated successfully, but these errors were encountered: