develooper Front page | perl.perl5.porters | Postings from September 2017

[perl #132177] 5.26.1 sanitize=undefined

Thread Previous
From:
Nigel Horne
Date:
September 28, 2017 18:03
Subject:
[perl #132177] 5.26.1 sanitize=undefined
Message ID:
rt-4.0.24-31948-1506601281-343.132177-75-0@perl.org
# New Ticket Created by  Nigel Horne 
# Please include the string:  [perl #132177]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=132177 >



This is a bug report for perl from njh@bandsman.co.uk,
generated with the help of perlbug 1.40 running under perl 5.26.1.


-----------------------------------------------------------------
I've built a Perl5.26.1 with -fsanitized=undefined and I keep seeing this:

pp_hot.c:4143:6: runtime error: null pointer passed as argument 1, which is declared to never be null

Here is the errant line: a call to Copy() within PP():

	    if (UNLIKELY(items - 1 > AvMAX(av))) {
		SV **ary = AvALLOC(av);
		Renew(ary, items, SV*);
		AvMAX(av) = items - 1;
		AvALLOC(av) = ary;
		AvARRAY(av) = ary;
	    }

	    Copy(MARK+1,AvARRAY(av),items,SV*);  /* <<<<<<<<<<<<<<<<<<<<< */
	    AvFILLp(av) = items - 1;
	} 



[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=medium
---
Site configuration information for perl 5.26.1:

Configured by njh at Wed Sep 27 17:47:22 EDT 2017.

Summary of my perl5 (revision 5 version 26 subversion 1) configuration:
   
  Platform:
    osname=linux
    osvers=4.12.0-2-amd64
    archname=x86_64-linux-thread-multi
    uname='linux microcenter 4.12.0-2-amd64 #1 smp debian 4.12.13-1 (2017-09-19) x86_64 gnulinux '
    config_args='-de -Dprefix=/home/njh/perl5/perlbrew/perls/perl-5.26.1-sanitize-undefined -Duseithreads -Dusedevel -Accflags=-fsanitize=undefined -g -O2 -lubsan -Acc=gcc-7 -Aldflags=-fsanitize=undefined -g -lubsan -Alddlflags=-shared -O2 -L/usr/local/lib -fstack-protector-strong -fsanitize=undefined -g -lubsan -Aeval:scriptdir=/home/njh/perl5/perlbrew/perls/perl-5.26.1-sanitize-undefined/bin'
    hint=recommended
    useposix=true
    d_sigaction=define
    useithreads=define
    usemultiplicity=define
    use64bitint=define
    use64bitall=define
    uselongdouble=undef
    usemymalloc=n
    default_inc_excludes_dot=define
    bincompat5005=undef
  Compiler:
    cc=' gcc-7'
    ccflags ='-D_REENTRANT -D_GNU_SOURCE -fsanitize=undefined -g -O2 -lubsan -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
    optimize='-O2'
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fsanitize=undefined -g -O2 -lubsan -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
    ccversion=''
    gccversion='7.2.0'
    gccosandvers=''
    intsize=4
    longsize=8
    ptrsize=8
    doublesize=8
    byteorder=12345678
    doublekind=3
    d_longlong=define
    longlongsize=8
    d_longdbl=define
    longdblsize=16
    longdblkind=3
    ivtype='long'
    ivsize=8
    nvtype='double'
    nvsize=8
    Off_t='off_t'
    lseeksize=8
    alignbytes=8
    prototype=define
  Linker and Libraries:
    ld=' gcc-7'
    ldflags =' -fsanitize=undefined -g -lubsan -fstack-protector-strong -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/7/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
    libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
    perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    libc=libc-2.24.so
    so=so
    useshrplib=false
    libperl=libperl.a
    gnulibc_version='2.24'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs
    dlext=so
    d_dlsymun=undef
    ccdlflags='-Wl,-E'
    cccdlflags='-fPIC'
    lddlflags=' -shared -O2 -L/usr/local/lib -fstack-protector-strong -fsanitize=undefined -g -lubsan'


---
@INC for perl 5.26.1:
    /home/njh/perl5/perlbrew/perls/perl-5.26.1-sanitize-undefined/lib/site_perl/5.26.1/x86_64-linux-thread-multi
    /home/njh/perl5/perlbrew/perls/perl-5.26.1-sanitize-undefined/lib/site_perl/5.26.1
    /home/njh/perl5/perlbrew/perls/perl-5.26.1-sanitize-undefined/lib/5.26.1/x86_64-linux-thread-multi
    /home/njh/perl5/perlbrew/perls/perl-5.26.1-sanitize-undefined/lib/5.26.1

---
Environment for perl 5.26.1:
    HOME=/home/njh
    LANG=en_GB.UTF-8
    LANGUAGE (unset)
    LD_LIBRARY_PATH=/usr/local/lib::
    LOGDIR (unset)
    PATH=/home/njh/perl5/perlbrew/bin:/home/njh/perl5/perlbrew/perls/perl-5.26.1-sanitize-undefined/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/njh/bin:/sbin
    PERLBREW_BASHRC_VERSION=0.80
    PERLBREW_HOME=/home/njh/.perlbrew
    PERLBREW_MANPATH=/home/njh/perl5/perlbrew/perls/perl-5.26.1-sanitize-undefined/man
    PERLBREW_PATH=/home/njh/perl5/perlbrew/bin:/home/njh/perl5/perlbrew/perls/perl-5.26.1-sanitize-undefined/bin
    PERLBREW_PERL=perl-5.26.1-sanitize-undefined
    PERLBREW_ROOT=/home/njh/perl5/perlbrew
    PERLBREW_VERSION=0.80
    PERL_BADLANG (unset)
    SHELL=/bin/bash


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About