From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5F5563849AFD; Wed, 24 Apr 2024 14:40:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5F5563849AFD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713969600; bh=pN0d0Q13cxSWY2EZNkbYRvI+nW40qkPsZ4/b9PNWjiw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Zm+vU/OY8bHZApMg2mMukocVHYcJQJQpoqiKIhuFFMr4NDN79+K9CGz1u+HTI8x1V xOlI36tf4TAo4imA9j7UMgSS0Hz8lOZLL/mjHNzH5IVq/4+2LyEzbxO5zCWLY516Uu 8H5bcDzOQ5i6k6W5lI/iM9nD4Far0mvkgKvbN7rw= 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: Wed, 24 Apr 2024 14:39:59 +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 #39 from GCC Commits --- The releases/gcc-11 branch has been updated by Uros Bizjak : https://gcc.gnu.org/g:624c3bb9ff762f196852dc77233610d1cdf7d7be commit r11-11351-g624c3bb9ff762f196852dc77233610d1cdf7d7be 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 gcc/ChangeLog: PR sanitizer/111736 * ubsan.c (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/testsuite/ChangeLog: * gcc.dg/ubsan/pr111736.c: New test. (cherry picked from commit ddd4a3ca87410886b039cc225907b4f6e650082e)=