From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3C55D3858419; Fri, 22 Mar 2024 08:25:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3C55D3858419 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711095924; bh=VRawQzgp0xUG/2/NfBbz3O50fC0yUo8WrA9vZa0F3Oo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vBSJHFq7RybFFlizivfrPHbHGJITvmBKAykpAX06wXyz+PxKBFoPwf95aS0Ze/0bn Tk2qreM/luQuSz1uBERFPvZF+xWXy5/CzPjZU+RbiagCRLYyHUczvQoVgGR0YLOlTw gmxauZ2qyI3rjkKlc4RlavD+AggFwM+kcYoy1JxI= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/111736] Address sanitizer is not compatible with named address spaces Date: Fri, 22 Mar 2024 08:25:20 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: sanitizer X-Bugzilla-Version: 12.1.0 X-Bugzilla-Keywords: addr-space, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.3 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=3D111736 --- Comment #25 from GCC Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:ddd4a3ca87410886b039cc225907b4f6e650082e commit r14-9610-gddd4a3ca87410886b039cc225907b4f6e650082e Author: Jakub Jelinek Date: Fri Mar 22 09:23:44 2024 +0100 ubsan: Don't -fsanitize=3Dnull instrument __seg_fs/gs pointers [PR11173= 6] On x86 and avr some address spaces allow 0 pointers (on avr actually even generic as, but libsanitizer isn't ported to it and I'm not convinced we should completely kill -fsanitize=3Dnull in that case). The following patch makes sure those aren't diagnosed for -fsanitize=3D= null, though they are still sanitized for -fsanitize=3Dalignment. 2024-03-22 Jakub Jelinek PR sanitizer/111736 * ubsan.cc (ubsan_expand_null_ifn, instrument_mem_ref): Avoid SANITIZE_NULL instrumentation for non-generic address spaces for which targetm.addr_space.zero_address_valid (as) is true. * gcc.dg/ubsan/pr111736.c: New test.=