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

runtime error: null pointer passed as argument 2, which is declared to never be null (pp_ctl.c:2000:2:) #16112

Closed
p5pRT opened this issue Aug 13, 2017 · 6 comments

Comments

@p5pRT
Copy link

p5pRT commented Aug 13, 2017

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

Searchable as RT131892$

@p5pRT
Copy link
Author

p5pRT commented Aug 13, 2017

From @geeknik

While compiling 7aaa36b for the purposes of fuzzing, I encountered some
"Undefined Behavior" similar to issue #131746.

Command line​:
./Configure -des -Dusedevel -DDEBUGGING -Dcc=afl-clang-fast -Doptimize=-O2\
-g -Accflags='-fsanitize=address,undefined -fno-omit-frame-pointer'
-Aldflags='-fsanitize=address,undefined -fno-omit-frame-pointer' &&
AFL_TRACE_PC=1 AFL_USE_ASAN=1 make

*SNIP*
./miniperl -Ilib configpm
written lib/Config.pod
./miniperl -Ilib make_ext.pl cpan/Archive-Tar/pm_to_blib MAKE="make"
LIBPERL_A=libperl.a
pp_ctl.c​:2000​:2​: runtime error​: null pointer passed as argument 2, which is
declared to never be null
/usr/include/string.h​:44​:28​: note​: nonnull attribute specified here
  #0 0x12b1e80 in Perl_pp_caller /root/perl5/pp_ctl.c​:2000​:2
  #1 0xc5fb5f in Perl_runops_debug /root/perl5/dump.c​:2483​:23
  #2 0x6b411f in Perl_call_sv /root/perl5/perl.c​:2885​:6
  #3 0x68faca in Perl_call_list /root/perl5/perl.c​:5056​:6
  #4 0x5ea949 in S_process_special_blocks /root/perl5/op.c​:9058​:6
  #5 0x57bff6 in Perl_newATTRSUB_x /root/perl5/op.c​:8987​:21
  #6 0x956836 in Perl_yyparse /root/perl5/perly.y​:302​:12
  #7 0x1309811 in S_doeval_compile /root/perl5/pp_ctl.c​:3460​:77
  #8 0x12f769d in S_require_file /root/perl5/pp_ctl.c​:4263​:9
  #9 0xc5fb5f in Perl_runops_debug /root/perl5/dump.c​:2483​:23
  #10 0x6b411f in Perl_call_sv /root/perl5/perl.c​:2885​:6
  #11 0x68faca in Perl_call_list /root/perl5/perl.c​:5056​:6
  #12 0x5ea949 in S_process_special_blocks /root/perl5/op.c​:9058​:6
  #13 0x57bff6 in Perl_newATTRSUB_x /root/perl5/op.c​:8987​:21
  #14 0x598671 in Perl_utilize /root/perl5/op.c​:6338​:5
  #15 0x9565a4 in Perl_yyparse /root/perl5/perly.y​:360​:6
  #16 0x1309811 in S_doeval_compile /root/perl5/pp_ctl.c​:3460​:77
  #17 0x12f769d in S_require_file /root/perl5/pp_ctl.c​:4263​:9
  #18 0xc5fb5f in Perl_runops_debug /root/perl5/dump.c​:2483​:23
  #19 0x6b411f in Perl_call_sv /root/perl5/perl.c​:2885​:6
  #20 0x68faca in Perl_call_list /root/perl5/perl.c​:5056​:6
  #21 0x5ea949 in S_process_special_blocks /root/perl5/op.c​:9058​:6
  #22 0x57bff6 in Perl_newATTRSUB_x /root/perl5/op.c​:8987​:21
  #23 0x598671 in Perl_utilize /root/perl5/op.c​:6338​:5
  #24 0x9565a4 in Perl_yyparse /root/perl5/perly.y​:360​:6
  #25 0x1309811 in S_doeval_compile /root/perl5/pp_ctl.c​:3460​:77
  #26 0x12f769d in S_require_file /root/perl5/pp_ctl.c​:4263​:9
  #27 0xc5fb5f in Perl_runops_debug /root/perl5/dump.c​:2483​:23
  #28 0x6ad1ef in perl_run /root/perl5/perl.c
  #29 0x17584bc in main /root/perl5/miniperlmain.c​:129​:9
  #30 0x7f323f85e4d9 in __libc_start_main (/lib64/libc.so.6+0x204d9)
  #31 0x41c1b9 in _start (/root/perl5/miniperl+0x41c1b9)

SUMMARY​: AddressSanitizer​: undefined-behavior pp_ctl.c​:2000​:2

@p5pRT
Copy link
Author

p5pRT commented Sep 4, 2017

From @tonycoz

On Sun, 13 Aug 2017 15​:10​:39 -0700, brian.carpenter@​gmail.com wrote​:

While compiling 7aaa36b for the purposes of fuzzing, I encountered some
"Undefined Behavior" similar to issue #131746.

Command line​:
./Configure -des -Dusedevel -DDEBUGGING -Dcc=afl-clang-fast -Doptimize=-O2\
-g -Accflags='-fsanitize=address,undefined -fno-omit-frame-pointer'
-Aldflags='-fsanitize=address,undefined -fno-omit-frame-pointer' &&
AFL_TRACE_PC=1 AFL_USE_ASAN=1 make

*SNIP*
./miniperl -Ilib configpm
written lib/Config.pod
./miniperl -Ilib make_ext.pl cpan/Archive-Tar/pm_to_blib MAKE="make"
LIBPERL_A=libperl.a
pp_ctl.c​:2000​:2​: runtime error​: null pointer passed as argument 2, which is
declared to never be null
/usr/include/string.h​:44​:28​: note​: nonnull attribute specified here
#0 0x12b1e80 in Perl_pp_caller /root/perl5/pp_ctl.c​:2000​:2

Fixed by f14cf36.

Tony

@p5pRT
Copy link
Author

p5pRT commented Sep 4, 2017

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

@p5pRT
Copy link
Author

p5pRT commented Sep 4, 2017

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

@p5pRT
Copy link
Author

p5pRT commented Jun 23, 2018

From @khwilliamson

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

With the release yesterday of Perl 5.28.0, this and 185 other issues have been
resolved.

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

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

@p5pRT p5pRT closed this as completed Jun 23, 2018
@p5pRT
Copy link
Author

p5pRT commented Jun 23, 2018

@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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant