From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from amailer.gwdg.de (amailer.gwdg.de [134.76.10.18]) by sourceware.org (Postfix) with ESMTPS id 268F93858D33 for ; Mon, 19 Dec 2022 15:43:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 268F93858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gwdg.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gwdg.de Received: from excmbx-11.um.gwdg.de ([134.76.9.220] helo=email.gwdg.de) by mailer.gwdg.de with esmtp (GWDG Mailer) (envelope-from ) id 1p7IIW-000EQE-Kd; Mon, 19 Dec 2022 16:43:24 +0100 Received: from EXCMBX-29.um.gwdg.de (134.76.9.204) by excmbx-11.um.gwdg.de (134.76.9.220) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Mon, 19 Dec 2022 16:43:24 +0100 Received: from fbmtpc21.tugraz.at (10.250.9.200) by EXCMBX-29.um.gwdg.de (134.76.9.204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2507.16; Mon, 19 Dec 2022 16:43:24 +0100 Message-ID: Subject: Re: new ubsan handler From: Martin Uecker To: Martin =?UTF-8?Q?Li=C5=A1ka?= , Date: Mon, 19 Dec 2022 16:43:23 +0100 In-Reply-To: <7aa27181-1e01-5711-7080-f50ad90d58be@suse.cz> References: <3c4aacb0-b8e7-de52-950b-74bbbc67c6bd@suse.cz> <232bd6bc9188adb68ec8faafe15ae2c3944054de.camel@gwdg.de> <7aa27181-1e01-5711-7080-f50ad90d58be@suse.cz> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3-1+deb11u1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Originating-IP: [10.250.9.200] X-ClientProxiedBy: excmbx-14.um.gwdg.de (134.76.9.225) To EXCMBX-29.um.gwdg.de (134.76.9.204) X-Virus-Scanned: (clean) by clamav X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Am Montag, dem 19.12.2022 um 15:22 +0100 schrieb Martin Liška: > On 12/19/22 10:25, Martin Uecker wrote: > > Am Montag, dem 19.12.2022 um 09:44 +0100 schrieb Martin Liška: > > > On 12/17/22 20:35, Martin Uecker wrote: > > > > > > > > > > > > Hi all, > > > > > > > > what is the process for adding a new UBsan handler? > > > > > > Hello. > > > > > > Yes, we sync the run-time library from LLVM project. So a new > > > sanitizer > > > should go there first. > > > > > > > > > > > We have the source in the GCC tree, but I guess this > > > > should go via LLVM? > > > > > > And the compiler support (instrumentation) is independent. > > > > Thanks Martin! > > > > Does it make sense to send the full patch (with changes > > to the compiler and library) to gcc-patches first for > > review? > > Yep, please CC me. > > > > > I am working on a patch that calls a handler when bounds > > for VM-types do not match on assignment. > > Nice. So basically something like -fsanitize=bounds/bounds- > strict/object-size ? Yes, it would diagnose the following mismatch and other similar cases: int a[10]; int n = 5; char (*p)[n] = &a; Martin