From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D074E384AB6F; Fri, 17 May 2024 13:48:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D074E384AB6F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1715953689; bh=RQYk2tAWsh4p+NO8yi7Dp03e7FkclzdnofevLcZXuMM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=AmOxa6ZoeB1ebDCI67J1u+taoF1b2x+dRks07Z0TGev3aJCkOH+1LFMgH7yk/yeEH JwbLKYEXzhmwqJejWDoS7g0vSfHuPrknie60lWwQL8PO60a1NOD4RmCmRD6LIbkpY/ fK5zMXVfyR+DdQbEqqaw+sEj7UWK/vMhM3cgT/ZQ= From: "sjames at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/115137] [15 regression] Miscompilation of wget (test suite hangs) Date: Fri, 17 May 2024 13:48:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sjames 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: Message-ID: In-Reply-To: References: 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=3D115137 --- Comment #1 from Sam James --- Notable bits: * -fno-strict-aliasing makes no difference * -fno-strict-overflow stops the hang * -fsanitize=3Daddress,undefined shows nothing with < GCC 15 * With GCC 15 only, I get ``` $ ./z url.c:1575:41: runtime error: load of address 0x557b31e7c12e with insuffici= ent space for an object of type 'const char' 0x557b31e7c12e: note: pointer points here 74 6d 6c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00= 00 00 00 00 00 00 00 00 ^=20 #0 0x557b31e7b681 in append_uri_pathel /home/sam/git/wget/backup/url.c:= 1575 #1 0x557b31e7b94b in test_append_uri_pathel /home/sam/git/wget/backup/url.c:1667 #2 0x557b31e7a3a8 in main /home/sam/git/wget/backup/url.c:1679 #3 0x7f251342df49 (/usr/lib64/libc.so.6+0x25f49) #4 0x7f251342e004 in __libc_start_main (/usr/lib64/libc.so.6+0x26004) #5 0x557b31e7a400 in _start (/home/sam/git/wget/backup/z+0x4400) SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior url.c:1575:41 in=20 Aborted (core dumped) ``` But only when building with `-O2 -fsanitize=3Daddress,undefined`. -O3 with ASAN+UBSAN is fine.=