From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CB77F385734A; Wed, 28 Sep 2022 18:40:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CB77F385734A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1664390429; bh=5HR5j43jzf7rAZmsSZx6MOHk7dqMbdaXwn+BlEfj7PU=; h=From:To:Subject:Date:From; b=ElZpQbyqvMhz46QEx9570FXKLuCTUkT0OP4xnTq6Jr9vtfjhr+AB9oz9JrGGDknAc wUAMPMEBcNXbjDf8PzIj7n0H8GnScyWxN5MSincXr18DIW4Cwo42i1IGgReC0fK/Gm XD9c+P5gdNR8K8FWe+9NFj738ET7U4n2y+Py9L5Q= From: "danglin at gcc dot gnu.org" To: glibc-bugs@sourceware.org Subject: [Bug build/29634] New: tst-realloc.c:134:12: error: pointer 'p' used after 'realloc' Date: Wed, 28 Sep 2022 18:40:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: build X-Bugzilla-Version: 2.35 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: danglin at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone cf_gcchost cf_gcctarget cf_gccbuild Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29634 Bug ID: 29634 Summary: tst-realloc.c:134:12: error: pointer 'p' used after 'realloc' Product: glibc Version: 2.35 Status: NEW Severity: normal Priority: P2 Component: build Assignee: unassigned at sourceware dot org Reporter: danglin at gcc dot gnu.org CC: carlos at redhat dot com Target Milestone: --- Host: hppa*-*-linux* Target: hppa*-*-linux* Build: hppa*-*-linux* gcc tst-realloc.c -c -std=3Dgnu11 -fgnu89-inline -g -O2 -Wall -Wwrite-stri= ngs -Wu ndef -Werror -fmerge-all-constants -frounding-math -fno-stack-protector -fno-com mon -Wstrict-prototypes -Wold-style-definition -fmath-errno -fno-pie -I../include -I/home/dave/gnu/glibc/objdir/malloc=20 -I/home/dave/gnu/glibc/objdir -I../sysdeps/unix/sysv/linux/hppa -I../sysdeps/hppa/nptl=20 -I../sysdeps/unix/s ysv/linux/include -I../sysdeps/unix/sysv/linux -I../sysdeps/nptl=20 -I../sysdeps/ pthread -I../sysdeps/gnu -I../sysdeps/unix/inet -I../sysdeps/unix/sysv=20 -I../ sysdeps/unix -I../sysdeps/posix -I../sysdeps/hppa/hppa1.1=20 -I../sysdeps/wordsi ze-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64=20 -I../sysdeps/hp pa/fpu -I../sysdeps/hppa -I../sysdeps/ieee754 -I../sysdeps/generic -I.. -I.. /libio -I. -nostdinc -isystem /usr/lib/gcc/hppa-linux-gnu/12/include -isyst= em /u sr/include -D_LIBC_REENTRANT -include /home/dave/gnu/glibc/objdir/libc-modules.h -DMODULE_NAME=3Dtestsuite -include ../include/libc-symbols.h=20=20=20=20= =20=20 -DTOP_NAMESPAC E=3Dglibc -DTEST_NO_MALLOPT -o /home/dave/gnu/glibc/objdir/malloc/tst-reall= oc.o -M D -MP -MF /home/dave/gnu/glibc/objdir/malloc/tst-realloc.o.dt -MT /home/dave/gnu /glibc/objdir/malloc/tst-realloc.o In function 'do_test', inlined from 'legacy_test_function' at ../test-skeleton.c:55:10: tst-realloc.c:134:12: error: pointer 'p' used after 'realloc' [-Werror=3Duse-after-free] 134 | if (c[i] !=3D 0xff) | ~^~~ tst-realloc.c:124:7: note: call to 'realloc' here 124 | c =3D realloc (p, -1); | ^~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[2]: *** [../o-iterator.mk:9: /home/dave/gnu/glibc/objdir/malloc/tst-realloc.o] Error 1 dave@atlas:~/gnu/glibc/objdir$ gcc -v Using built-in specs. COLLECT_GCC=3Dgcc COLLECT_LTO_WRAPPER=3D/usr/lib/gcc/hppa-linux-gnu/12/lto-wrapper Target: hppa-linux-gnu Configured with: ../src/configure -v --with-pkgversion=3D'Debian 12.2.0-3' --with-bugurl=3Dfile:///usr/share/doc/gcc-12/README.Bugs --enable-languages=3Dc,ada,c++,d,fortran,objc,obj-c++,m2 --prefix=3D/usr --with-gcc-major-version-only --program-suffix=3D-12 --program-prefix=3Dhppa-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=3D/usr/lib --without-included-gettext --enable-threads=3Dposix --libdir=3D/usr/lib --enable-nls --enable-clocale=3Dgnu --enable-libstdcxx-= debug --enable-libstdcxx-time=3Dyes --with-default-libstdcxx-abi=3Dnew --enable-gnu-unique-object --disable-libssp --disable-libitm --disable-libsanitizer --disable-libquadmath --disable-libquadmath-support --enable-plugin --with-system-zlib --enable-libphobos-checking=3Drelease --with-target-system-zlib=3Dauto --enable-objc-gc=3Dauto --enable-multiarch --disable-werror --disable-libstdcxx-pch --enable-checking=3Drelease --build=3Dhppa-linux-gnu --host=3Dhppa-linux-gnu --target=3Dhppa-linux-gnu Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.2.0 (Debian 12.2.0-3) --=20 You are receiving this mail because: You are on the CC list for the bug.=