From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B83E33858D3C; Tue, 21 Mar 2023 18:56:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B83E33858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679425017; bh=ICiZsP/8wT0qxh3Ra+K3uTeUfVnSErQ2qfMWqqVlDPo=; h=From:To:Subject:Date:From; b=EsjYeDkCCUtNmNN2A4u0ZUzyq+UVTpWMP7iEAtd+UJGTQ2wngGDeWwYk9s45eTcJ4 lZW1ZE/+HmyDtXoFBRrEveAO2bfL+xlVu8WO/QbgLH/v39Q7KJwkjRONjNltrntHX6 cSShwMlJINRo7J4JX2IqZIshR2M7SGvlr7cmsqYM= From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyB0cmVlLW9wdGltaXphdGlvbi8xMDkyMzhdIE5ldzogWzEz?= =?UTF-8?B?IFJlZ3Jlc3Npb25dIHRzdC1yZWFsbG9jLmk6NDI6MTk6IGVycm9yOiBwb2lu?= =?UTF-8?B?dGVyIOKAmHDigJkgbWF5IGJlIHVzZWQgYWZ0ZXIg4oCYcmVhbGxvY+KAmSBb?= =?UTF-8?B?LVdlcnJvcj11c2UtYWZ0ZXItZnJlZV0gaW4gZ2xpYmMgdGVzdHM=?= Date: Tue, 21 Mar 2023 18:56:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.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 attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109238 Bug ID: 109238 Summary: [13 Regression] tst-realloc.i:42:19: error: pointer =E2=80=98p=E2=80=99 may be used after =E2=80=98realloc= =E2=80=99 [-Werror=3Duse-after-free] in glibc tests Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: rguenth at gcc dot gnu.org Target Milestone: --- Created attachment 54723 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D54723&action=3Dedit Unreduced test-case It's the same issue as PR109170 this time in glibc's test-suite: [ 1569s] gcc tst-realloc.c -c -std=3Dgnu11 -fgnu89-inline -O2 -Wall -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=3Dreturn-type -g -Wall -Wwrite-strings -Wundef -Werror -fmerge-all-constants -frounding-math -fstack-protector-strong -fno-common -Wstrict-prototypes -Wold-style-definition -fmath-errno -fPIE -fcf-protection -I../include -I/home/abuild/rpmbuild/BUILD/glibc-2.37.9000.180.g9e2ff880f3/cc-base/mallo= c=20 -I/home/abuild/rpmbuild/BUILD/glibc-2.37.9000.180.g9e2ff880f3/cc-base=20 -I../sysdeps/unix/sysv/linux/x86_64/64 -I../sysdeps/unix/sysv/linux/x86_64= =20 -I../sysdeps/unix/sysv/linux/x86/include -I../sysdeps/unix/sysv/linux/x86=20 -I../sysdeps/x86/nptl -I../sysdeps/unix/sysv/linux/wordsize-64=20 -I../sysdeps/x86_64/nptl -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux -I../sysdeps/nptl -I../sysdeps/pthread=20 -I../sysdeps/gnu -I../sysdeps/unix/inet -I../sysdeps/unix/sysv=20 -I../sysdeps/unix/x86_64 -I../sysdeps/unix -I../sysdeps/posix=20 -I../sysdeps/x86_64/64 -I../sysdeps/x86_64/fpu/multiarch=20 -I../sysdeps/x86_64/fpu -I../sysdeps/x86/fpu -I../sysdeps/x86_64/multiarc= h=20 -I../sysdeps/x86_64 -I../sysdeps/x86/include -I../sysdeps/x86=20 -I../sysdeps/ieee754/float128 -I../sysdeps/ieee754/ldbl-96/include -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64=20 -I../sysdeps/ieee754/flt-32 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754= =20 -I../sysdeps/generic -I.. -I../libio -I. -D_LIBC_REENTRANT -include /home/abuild/rpmbuild/BUILD/glibc-2.37.9000.180.g9e2ff880f3/cc-base/libc-mo= dules.h -DMODULE_NAME=3Dtestsuite -include ../include/libc-symbols.h -DPIC=20=20= =20=20 -DTOP_NAMESPACE=3Dglibc -DTEST_NO_MALLOPT -o /home/abuild/rpmbuild/BUILD/glibc-2.37.9000.180.g9e2ff880f3/cc-base/malloc/= tst-realloc.o -MD -MP -MF /home/abuild/rpmbuild/BUILD/glibc-2.37.9000.180.g9e2ff880f3/cc-base/malloc/= tst-realloc.o.dt -MT /home/abuild/rpmbuild/BUILD/glibc-2.37.9000.180.g9e2ff880f3/cc-base/malloc/= tst-realloc.o [ 1569s] In function 'do_test', [ 1569s] inlined from 'legacy_test_function' at ../test-skeleton.c:55:1= 0: [ 1569s] tst-realloc.c:135:7: error: pointer 'p' may be used after 'realloc' [-Werror=3Duse-after-free] [ 1569s] 135 | p =3D realloc (p, 0); [ 1569s] | ^~~~~~~~~~~~~~ [ 1569s] tst-realloc.c:117:7: note: call to 'realloc' here [ 1569s] 117 | c =3D realloc (p, -1); [ 1569s] | ^~~~~~~~~~~~~~~ [ 1569s] tst-realloc.c:127:12: error: pointer 'p' may be used after 'reallo= c' [-Werror=3Duse-after-free] [ 1569s] 127 | if (c[i] !=3D 0xff) [ 1569s] | ^ [ 1569s] tst-realloc.c:117:7: note: call to 'realloc' here [ 1569s] 117 | c =3D realloc (p, -1); $ gcc tst-realloc.i -c -O2 -Wall -Werror In function =E2=80=98do_test=E2=80=99, inlined from =E2=80=98legacy_test_function=E2=80=99 at ../test-skeleton= .c:55:10: tst-realloc.c:135:7: error: pointer =E2=80=98p=E2=80=99 may be used after = =E2=80=98realloc=E2=80=99 [-Werror=3Duse-after-free] tst-realloc.c:117:7: note: call to =E2=80=98realloc=E2=80=99 here tst-realloc.c:127:12: error: pointer =E2=80=98p=E2=80=99 may be used after = =E2=80=98realloc=E2=80=99 [-Werror=3Duse-after-free] tst-realloc.c:117:7: note: call to =E2=80=98realloc=E2=80=99 here cc1: all warnings being treated as errors=