You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
panic: pad_findmy_pvn illegal flag bits 0x20000000 #16979
While fuzzing perl v5.29.9-63-g2496d8f3f7 built with afl and run
under libdislocator, I found the following program
use utf8; eval "sort \x{100}%"; warn $@;
to emit 'panic: pad_findmy_pvn illegal flag bits 0x20000000 at (eval
1) line 1.' diagnostics.
This is a regression between 5.20 and 5.22, bisect points to
commit 2502ffd
Author: Father Chrysostomos <sprout@cpan.org>
Date: Mon Nov 24 00:00:51 2014 -0800
Make pad names always UTF8
Prior to 5.16, pad names never used the UTF8 flag, and all non-ASCII
pad names were in UTF8. Because the latter was consistently true,
everything just worked anyway.
In 5.16, UTF8 handling was done ‘properly’, so that non-ASCII UTF8
strings were always accompanied by the UTF8 flag.
Now, it is still the case that the only non-ASCII names to make their
way into pad name code are in UTF8. Since ASCII is a subset of UTF8,
we effectively *always* have UTF8 pad names. So the flag handling is
actually redundant.
If we just assume that all pad names are UTF8 (which is true), then
we don’t need to bother with the flag checking. There is actually
no reason why we should have two different encodings for storing
pad names.
So this commit enforces what has always been the case and removes the
extra code for converting between Latin-1 and UTF8. Nothing on CPAN
is using the UTF8 flag with pads, so nothing should break. In fact,
we never documented padadd_UTF8_NAME.
use utf8; eval "sort \x{100}%"; warn $@;
panic: pad_findmy_pvn illegal flag bits 0x20000000 at (eval 1) line 1.
Patch attached.
Sawyer, is this OK to merge before 5.30?
My two cents: At this point in the dev cycle we should not be making changes in *.c or *.h files. The potential ramifications of changes to the guts are vast. Our ability to thoroughly assess the impact in the time remaining to production release is very limited.
use utf8; eval "sort \x{100}%"; warn $@;
panic: pad_findmy_pvn illegal flag bits 0x20000000 at (eval 1) line
1.
Patch attached.
Sawyer, is this OK to merge before 5.30?
My two cents: At this point in the dev cycle we should not be making
changes in *.c or *.h files. The potential ramifications of changes
to the guts are vast. Our ability to thoroughly assess the impact in
the time remaining to production release is very limited.
That's why we have code freezes.
I would like to add my thanks to Sergey Aleynikov for the tremendous work he has done during this development cycle at identifying weaknesses in our source code with his fuzzing work. See, for example, all the items added to our "fuzzer-detected issues" META ticket (https://rt-archive.perl.org/perl5/Ticket/Display.html?id=126546) which come from his work.
Nonetheless, we have generally not been treating these bug reports as blockers for perl-5.30, whether or not we have been able to write patches for them. If we're not treating this particular RT as a blocker, then we should not be applying a patch for it during code freeze.
use utf8; eval "sort \x{100}%"; warn $@;
panic: pad_findmy_pvn illegal flag bits 0x20000000 at (eval 1) line
1.
Patch attached.
Sawyer, is this OK to merge before 5.30?
My two cents: At this point in the dev cycle we should not be making
changes in *.c or *.h files. The potential ramifications of changes
to the guts are vast. Our ability to thoroughly assess the impact in
the time remaining to production release is very limited.
That's why we have code freezes.
I would like to add my thanks to Sergey Aleynikov for the tremendous work he has done during this development cycle at identifying weaknesses in our source code with his fuzzing work. See, for example, all the items added to our "fuzzer-detected issues" META ticket (https://rt-archive.perl.org/perl5/Ticket/Display.html?id=126546) which come from his work.
Nonetheless, we have generally not been treating these bug reports as blockers for perl-5.30, whether or not we have been able to write patches for them. If we're not treating this particular RT as a blocker, then we should not be applying a patch for it during code freeze.
It is my experience that these reports from Sergey, once investigated,
show real underlying problems that should be fixed; they don't tend to
be just edge cases that won't ever come up in real code, but symptomatic
of real code potential issues once reduced to simpler test cases
The ones that bisect to this development cycle might actually ought to
be blockers, depending on the outcome of an investigation.
But my point is that they really should be investigated to be sure.
I've looked so far at all but two of the ones for the areas I have
expertise in.
use utf8; eval "sort \x{100}%"; warn $@;
panic: pad_findmy_pvn illegal flag bits 0x20000000 at (eval 1) line 1.
Patch attached.
Sawyer, is this OK to merge before 5.30?
I didn't see an email on this response.
Generally, the answer would be no. In this case, it seems like a very small patch (with a test) that might just be okay enough. My only concern is whether this could reintroduce some breakage for which we do not have a test? Will it break some CPAN module that depends on this incorrect behavior? (I'm not sure how one even could do that, but... maybe?)
I would prefer another person with strong UTF background (say, Karl) to back this up.
Regardless, Sergey's work and contributions are very much appreciated, both by me and by the other core developers. Thank you for helping us create a better Perl. :)
Activity
p5pRT commentedon Apr 25, 2019
From @dur-randir
Created by @dur-randir
While fuzzing perl v5.29.9-63-g2496d8f3f7 built with afl and run
under libdislocator, I found the following program
use utf8; eval "sort \x{100}%"; warn $@;
to emit 'panic: pad_findmy_pvn illegal flag bits 0x20000000 at (eval
1) line 1.' diagnostics.
This is a regression between 5.20 and 5.22, bisect points to
commit 2502ffd
Author: Father Chrysostomos <sprout@cpan.org>
Date: Mon Nov 24 00:00:51 2014 -0800
Make pad names always UTF8
Prior to 5.16, pad names never used the UTF8 flag, and all non-ASCII
pad names were in UTF8. Because the latter was consistently true,
everything just worked anyway.
In 5.16, UTF8 handling was done ‘properly’, so that non-ASCII UTF8
strings were always accompanied by the UTF8 flag.
Now, it is still the case that the only non-ASCII names to make their
way into pad name code are in UTF8. Since ASCII is a subset of UTF8,
we effectively *always* have UTF8 pad names. So the flag handling is
actually redundant.
If we just assume that all pad names are UTF8 (which is true), then
we don’t need to bother with the flag checking. There is actually
no reason why we should have two different encodings for storing
pad names.
So this commit enforces what has always been the case and removes the
extra code for converting between Latin-1 and UTF8. Nothing on CPAN
is using the UTF8 flag with pads, so nothing should break. In fact,
we never documented padadd_UTF8_NAME.
Perl Info
p5pRT commentedon Apr 26, 2019
From @arc
Sergey Aleynikov (via RT) <perlbug-followup@perl.org> wrote:
Patch attached.
Sawyer, is this OK to merge before 5.30?
--
Aaron Crane
p5pRT commentedon Apr 26, 2019
From @arc
0001-RT-134061-don-t-call-pad_findmy_pvn-with-invalid-fla.patch
p5pRT commentedon Apr 26, 2019
The RT System itself - Status changed from 'new' to 'open'
p5pRT commentedon Apr 26, 2019
From @jkeenan
On Fri, 26 Apr 2019 13:06:15 GMT, arc wrote:
My two cents: At this point in the dev cycle we should not be making changes in *.c or *.h files. The potential ramifications of changes to the guts are vast. Our ability to thoroughly assess the impact in the time remaining to production release is very limited.
That's why we have code freezes.
--
James E Keenan (jkeenan@cpan.org)
p5pRT commentedon Apr 26, 2019
From @jkeenan
On Fri, 26 Apr 2019 13:49:01 GMT, jkeenan wrote:
I would like to add my thanks to Sergey Aleynikov for the tremendous work he has done during this development cycle at identifying weaknesses in our source code with his fuzzing work. See, for example, all the items added to our "fuzzer-detected issues" META ticket (https://rt-archive.perl.org/perl5/Ticket/Display.html?id=126546) which come from his work.
Nonetheless, we have generally not been treating these bug reports as blockers for perl-5.30, whether or not we have been able to write patches for them. If we're not treating this particular RT as a blocker, then we should not be applying a patch for it during code freeze.
Thank you very much.
--
James E Keenan (jkeenan@cpan.org)
p5pRT commentedon Apr 26, 2019
From @khwilliamson
On 4/26/19 7:54 AM, James E Keenan via RT wrote:
It is my experience that these reports from Sergey, once investigated,
show real underlying problems that should be fixed; they don't tend to
be just edge cases that won't ever come up in real code, but symptomatic
of real code potential issues once reduced to simpler test cases
The ones that bisect to this development cycle might actually ought to
be blockers, depending on the outcome of an investigation.
But my point is that they really should be investigated to be sure.
I've looked so far at all but two of the ones for the areas I have
expertise in.
p5pRT commentedon Apr 27, 2019
From @xsawyerx
On Fri, 26 Apr 2019 06:06:15 -0700, arc wrote:
I didn't see an email on this response.
Generally, the answer would be no. In this case, it seems like a very small patch (with a test) that might just be okay enough. My only concern is whether this could reintroduce some breakage for which we do not have a test? Will it break some CPAN module that depends on this incorrect behavior? (I'm not sure how one even could do that, but... maybe?)
I would prefer another person with strong UTF background (say, Karl) to back this up.
Regardless, Sergey's work and contributions are very much appreciated, both by me and by the other core developers. Thank you for helping us create a better Perl. :)
p5pRT commentedon Apr 27, 2019
From @tonycoz
On Fri, 26 Apr 2019 06:06:15 -0700, arc wrote:
I'm not sure the patch is correct.
With sprout's change pad_findmy_pvn() now expects a UTF-8 string.
Is there anything that forces the SV to UTF-8?
Tony
p5pRT commentedon May 1, 2019
From @tonycoz
On Sat, 27 Apr 2019 02:31:33 -0700, tonyc wrote:
There is when it matters.
Non-ASCII barewords are only allowed under C<use utf8;>, and when use utf8 is on the SV will be UTF-8 encoded.
Without the use utf8 only invariant strings can be in the SV and so it's safe to pass the string to pad_findmy_pvn() without upgrading it.
So my concern here was unjustified.
Tony
p5pRT commentedon May 2, 2019
From @xsawyerx
On 5/1/19 4:46 AM, Tony Cook via RT wrote:
So you feel confident about merging it now?
p5pRT commentedon May 2, 2019
From @tonycoz
On Thu, May 02, 2019 at 03:19:47PM +0300, Sawyer X wrote:
Yes.
Tony
p5pRT commentedon May 2, 2019
From @xsawyerx
Then go for it.
On 5/2/19 4:18 PM, Tony Cook wrote:
p5pRT commentedon May 2, 2019
From @khwilliamson
On 5/2/19 7:25 AM, Sawyer X wrote:
We need a commit message before it can be merged.
p5pRT commentedon May 3, 2019
From @tonycoz
On Thu, 02 May 2019 09:06:26 -0700, public@khwilliamson.com wrote:
It had a commit message, I didn't immediately apply it because it was 11:18pm (and it turned out to fail test_porting).
Applied as 9a48f2a.
porting/test_bootstrap.t disallows most use of use in t/comp, so I moved the test to t/uni/parser.t in 5a62190.
Tony
p5pRT commentedon May 3, 2019
@tonycoz - Status changed from 'open' to 'pending release'
p5pRT commentedon May 22, 2019
From @khwilliamson
Thank you for filing this report. You have helped make Perl better.
With the release today of Perl 5.30.0, this and 160 other issues have been
resolved.
Perl 5.30.0 may be downloaded via:
https://metacpan.org/release/XSAWYERX/perl-5.30.0
If you find that the problem persists, feel free to reopen this ticket.
p5pRT commentedon May 22, 2019
@khwilliamson - Status changed from 'pending release' to 'resolved'