From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 53FBD3858D39; Thu, 2 Nov 2023 23:25:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 53FBD3858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1698967521; bh=xaYkFINdg00optDxspGE4nKXm5N6D1QrPwNqaQEvmeo=; h=From:To:Subject:Date:From; b=AtIu41MVjpf6sPSFNd90Z8mkGfKyp2CrXRQxtoQgS/LiteACvBBBb9yiNQ5WdaeiZ Zq6u3dXl/U35314KYEMjG72tc7udgAll+ZJBu0bjpFPA8bkwl28+Uh5E6IwutygOPi Nmpq7oyTRUuc2P+0po3pdQTwanAjXuDftOjVUD4I= From: "jsm28 at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/112358] New: [14 Regression] glibc -Wstringop-overflow= build failure Date: Thu, 02 Nov 2023 23:25:20 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jsm28 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 cf_gcctarget 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=3D112358 Bug ID: 112358 Summary: [14 Regression] glibc -Wstringop-overflow=3D build failure Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: jsm28 at gcc dot gnu.org CC: rguenth at gcc dot gnu.org Target Milestone: --- Target: hppa-linux-gnu Created attachment 56497 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D56497&action=3Dedit preprocessed source Building glibc for hppa-linux-gnu has been failing since 18 September: In file included from ../include/atomic.h:49, from dl-find_object.c:20: In function '_dlfo_update_init_seg', inlined from '_dl_find_object_update_1' at dl-find_object.c:689:30, inlined from '_dl_find_object_update' at dl-find_object.c:805:13: ../sysdeps/unix/sysv/linux/hppa/atomic-machine.h:44:4: error: '__atomic_store_4' writing 4 bytes into a region of size 0 overflows the destination [-Werror=3Dstringop-overflow=3D] 44 | __atomic_store_n ((mem), (val), __ATOMIC_RELAXED);=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20 \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ dl-find_object.c:644:3: note: in expansion of macro 'atomic_store_relaxed' 644 | atomic_store_relaxed (&seg->size, new_seg_size); | ^~~~~~~~~~~~~~~~~~~~ In function '_dl_find_object_update': cc1: note: destination object is likely at address zero Compile the attached test with -O2 -Wall: In function '_dlfo_update_init_seg', inlined from '_dl_find_object_update_1' at dl-find_object.c:689:30, inlined from '_dl_find_object_update' at dl-find_object.c:805:12: dl-find_object.c:644:132: warning: '__atomic_store_4' writing 4 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=3D] In function '_dl_find_object_update': cc1: note: destination object is likely at address zero I don't know why the compiler thinks "destination object is likely at addre= ss zero", so maybe there is actually an issue in the glibc sources, but I didn= 't see an obvious reason for the warning/error. Introduced by the commit: commit d45ddc2c04e471d0dcee016b6edacc00b8341b16 Author: Richard Biener AuthorDate: Thu Sep 14 13:06:51 2023 +0200 Commit: Richard Biener CommitDate: Mon Sep 18 10:56:18 2023 +0200 tree-optimization/111294 - backwards threader PHI costing=