Skip to content
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

null ptr deref, segfault in Perl_pp_negate pp.c:2549 #15579

Closed
p5pRT opened this issue Sep 1, 2016 · 6 comments
Closed

null ptr deref, segfault in Perl_pp_negate pp.c:2549 #15579

p5pRT opened this issue Sep 1, 2016 · 6 comments

Comments

@p5pRT
Copy link

p5pRT commented Sep 1, 2016

Migrated from rt.perl.org#129167 (status was 'resolved')

Searchable as RT129167$

@p5pRT
Copy link
Author

p5pRT commented Sep 1, 2016

From @geeknik

v5.25.4-27-gf16e7fa

./perl -e '-splice@​a,$#a=0'

==11739==ERROR​: AddressSanitizer​: SEGV on unknown address 0x00000000000c (pc 0x0000009c9e00 bp 0x6210000113b8 sp 0x7ffc656105c0 T0)
  #0 0x9c9dff in Perl_pp_negate /home/geeknik/perl/pp.c​:2549​:5
  #1 0x7f2623 in Perl_runops_debug /home/geeknik/perl/dump.c​:2234​:23
  #2 0x5a10c6 in S_run_body /home/geeknik/perl/perl.c​:2525​:2
  #3 0x5a10c6 in perl_run /home/geeknik/perl/perl.c​:2448
  #4 0x4de6cd in main /home/geeknik/perl/perlmain.c​:123​:9
  #5 0x7fb0491e6b44 in __libc_start_main /build/glibc-uPj9cH/glibc-2.19/csu/libc-start.c​:287
  #6 0x4de33c in _start (/home/geeknik/perl/perl+0x4de33c)

AddressSanitizer can not provide additional info.
SUMMARY​: AddressSanitizer​: SEGV /home/geeknik/perl/pp.c​:2549 Perl_pp_negate
==11739==ABORTING

Program received signal SIGSEGV, Segmentation fault.
0x000000000054d9cb in Perl_pp_negate () at pp.c​:2549
2549 tryAMAGICun_MG(neg_amg, AMGf_numeric);
(gdb) bt
#0 0x000000000054d9cb in Perl_pp_negate () at pp.c​:2549
#1 0x00000000004d6262 in Perl_runops_debug () at dump.c​:2234
#2 0x0000000000452e97 in S_run_body (oldscope=1) at perl.c​:2525
#3 perl_run (my_perl=<optimized out>) at perl.c​:2448
#4 0x0000000000421835 in main (argc=3, argv=0x7fffffffe6c8, env=0x7fffffffe6e8) at perlmain.c​:123

==19494== Invalid read of size 4
==19494== at 0x54D9CB​: Perl_pp_negate (pp.c​:2549)
==19494== by 0x4D6261​: Perl_runops_debug (dump.c​:2234)
==19494== by 0x452E96​: S_run_body (perl.c​:2525)
==19494== by 0x452E96​: perl_run (perl.c​:2448)
==19494== by 0x421834​: main (perlmain.c​:123)
==19494== Address 0xc is not stack'd, malloc'd or (recently) free'd
==19494==
==19494==
==19494== Process terminating with default action of signal 11 (SIGSEGV)
==19494== Access not within mapped region at address 0xC
==19494== at 0x54D9CB​: Perl_pp_negate (pp.c​:2549)
==19494== by 0x4D6261​: Perl_runops_debug (dump.c​:2234)
==19494== by 0x452E96​: S_run_body (perl.c​:2525)
==19494== by 0x452E96​: perl_run (perl.c​:2448)
==19494== by 0x421834​: main (perlmain.c​:123)
==19494== If you believe this happened as a result of a stack
==19494== overflow in your program's main thread (unlikely but
==19494== possible), you can try to increase the size of the
==19494== main thread stack using the --main-stacksize= flag.
==19494== The main thread stack size used in this run was 8388608.
Segmentation fault

@p5pRT
Copy link
Author

p5pRT commented Sep 12, 2016

From @cpansprout

Now fixed in 92b69f6.

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Sep 12, 2016

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Sep 12, 2016

@cpansprout - Status changed from 'open' to 'pending release'

@p5pRT
Copy link
Author

p5pRT commented May 30, 2017

From @khwilliamson

Thank you for filing this report. You have helped make Perl better.

With the release today of Perl 5.26.0, this and 210 other issues have been
resolved.

Perl 5.26.0 may be downloaded via​:
https://metacpan.org/release/XSAWYERX/perl-5.26.0

If you find that the problem persists, feel free to reopen this ticket.

@p5pRT
Copy link
Author

p5pRT commented May 30, 2017

@khwilliamson - Status changed from 'pending release' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant