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 segfaults in BEGIN, write to null pointer, separate bug #14852
Comments
From @dcollinsnThis is distinct from #125789 (duplicate of #121048, patch in #125341). This segfault occurs in a different function and appears to be unrelated. Reini's patch in #125341 does not affect this bug. The testcase is the following 15-character file: BEGIN(){i or$[} Bisect not attempted because this also crashes in my ancient perl 5.10.1 install. **GDB** The relevant call to Move in sv.c has the following parameters: **VALGRIND** **PERL -V** Characteristics of this binary (from libperl): |
From @wolfsageOn Thu, Aug 13, 2015 at 7:05 PM, Dan Collins <perlbug-followup@perl.org> wrote:
Looks like it first broke in 5.8.9, and since then has failed -- Matthew Horsfall (alh) |
The RT System itself - Status changed from 'new' to 'open' |
From zefram@fysh.orgThe test case simplifies to: $ perl -e 'BEGIN {} BEGIN () {1}' The necessary elements are a BEGIN block with constant-value (foldable) The mode by which it fails is that the constant-value BEGIN block gets Fixing this is not trivial. It's easy enough to prevent sv_setpv() So I think the automatic running and freeing needs to be shifted around, -zefram |
From @cpansproutOn Mon, 04 Dec 2017 08:20:43 -0800, zefram@fysh.org wrote:
newXS_len_flags is not API, so we can change it however we want. I also think it should remain private, precisely so that we have wiggle room to fix problems such as this in future. (This is not the first time it has needed a significant rework to fix bug.) -- Father Chrysostomos |
This does not segfault in 5.34.1. Possibly because the prototype is ignored because the expression is not constant. See also #16057 for the same reduced bug. |
Doing some testing: on v5.34.1: This no longer segfaults on v5.34.1:
but something like:
still does (on v5.34.1, not on blead). Digging a bit deeper: using
So you are indeed somewhat correct: the example in the issue description no longer segfaults - on v5.34.1 - but that's simply because there no longer is an earlier The real solution is the one you committed for #16057 |
Ah, i guess you mean e5d2a2e Cool. :-) Closing. |
Migrated from rt.perl.org#125806 (status was 'open')
Searchable as RT125806$
The text was updated successfully, but these errors were encountered: