Skip Menu |
Report information
Id: 131892
Status: pending release
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: brian.carpenter [at] gmail.com
Cc:
AdminCc:

Operating System: (no value)
PatchStatus: (no value)
Severity: low
Type: unknown
Perl Version: (no value)
Fixed In: (no value)



Date: Sun, 13 Aug 2017 17:09:22 -0500
To: perlbug [...] perl.org
Subject: runtime error: null pointer passed as argument 2, which is declared to never be null (pp_ctl.c:2000:2:)
From: Brian Carpenter <brian.carpenter [...] gmail.com>
Download (untitled) / with headers
text/plain 2.6k
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
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 923b
On Sun, 13 Aug 2017 15:10:39 -0700, brian.carpenter@gmail.com wrote: Show quoted text
> 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 f14cf3632059d421de83cf901c7e849adc1fcd03. Tony


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org