From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by sourceware.org (Postfix) with ESMTPS id 8142438708B4; Tue, 29 Aug 2023 15:35:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8142438708B4 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-31c93d2a24fso2288137f8f.2; Tue, 29 Aug 2023 08:35:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693323358; x=1693928158; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=intHv9UJZLukOHN/hKyVcXHbuOUoyXiJmzM53+WjSFg=; b=aWSp8dTCoY5aNXRN14Viryw7RKeslY68MR8/W+NXBwiREUrOAS1chMixuB4zutMOM8 fZ3+vzEKXO0Cu3KSpjii/4PKVwQEBmxCm+rsjPFYW8bNUJr7iODe+X7zuGVfAEGdT1NR r6xwInmvaIhh6HNuuVf4D9hPd9qjGOxZ6kxDOPHPunPfMjWib+xBZpckR6MHHM15RNf2 tVEhm98ernjwQA2950mC1CZtop4i6IcHRDCcSw4V6zJfTWwd/FSHVhmnFaxiJuQIC1ys X7UiBjeRWIcTRipN2myGTvu663RwynB7VEGKWqot9cKgyG8JK0sQMi3CThZ7yXCOciUN Xp1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693323358; x=1693928158; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=intHv9UJZLukOHN/hKyVcXHbuOUoyXiJmzM53+WjSFg=; b=eJqE2NuPEse/cEPy9Jr0RDueqkFBBV7oZbqkUytcqlo/IB9aKeFNZYDNJ+qflHWt3v jsSxB84nWlrheNl4MM7TwyzUCfmo8Bd38l6Dm5A19Wm4Fbm7u9rLvB5FI+SQmdFpQqqt EvmWLOc1tV05baWp5nPwmnW6lu3k+z3EeqCnNWZQUx/7uEj2fP04thiAthfcQyLfFCEi AsI0zx7VDlZ5pSvRE92R5XOA1hXa5B6+Pgu8HAGeGJtn8UJbHZ+y4T6/IQ165HJ/qjkJ v/2qIuZP/IhkuE/xWanzP6W+KqSyU5xGTYII+/qPX3RE97zEvSsG9XamosR0MUKNYM/y vpRA== X-Gm-Message-State: AOJu0YxFUNzFUR/feL5MMDx71d7vCLvN3Lpkr1eF/sQRlOwNgy5hgHFK u/LhVCY/LlaX53Bn64ens9cc9TGvFwstqCIXTmk= X-Google-Smtp-Source: AGHT+IFLN45nE4zsP2WHbLR0Mmm56xtOAe1IA1i1P3dB60ndNcZNF4a5DqoIe9glIG2Jemps3Ecwx9MGBlbgzUJxcus= X-Received: by 2002:adf:ce82:0:b0:317:6e62:b124 with SMTP id r2-20020adfce82000000b003176e62b124mr22075699wrn.18.1693323358092; Tue, 29 Aug 2023 08:35:58 -0700 (PDT) MIME-Version: 1.0 References: <059ffebd230df2dbbac3f138ec85016bb7a7306a.camel@redhat.com> In-Reply-To: From: Guillaume Gomez Date: Tue, 29 Aug 2023 17:35:46 +0200 Message-ID: Subject: Re: [PATCH] libgccjit: Add support for `restrict` attribute on function parameters To: David Malcolm Cc: Antoni Boucher , gcc-patches@gcc.gnu.org, jit@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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: Thanks a lot! Le mar. 29 ao=C3=BBt 2023 =C3=A0 17:35, David Malcolm = a =C3=A9crit : > > On Tue, 2023-08-29 at 17:15 +0200, Guillaume Gomez wrote: > > We finished the investigation and found out the issue: when passing > > arguments by value to functions, rustc still provides "NoAlias" as > > attribute to the argument whereas it should never be passed in this > > case. Luckily for us, in case the argument is a function pointer > > coming from a struct field, it crashes GCC, which is what allowed us > > to figure out about this. A code which reproduces this bug: > > [...snip...] > > > So in short: the patch in the previous mail which added this check: > > > > ``` > > RETURN_NULL_IF_FAIL (type->is_pointer (), NULL, NULL, "not a pointer > > type"); > > ``` > > > > is correct and ready. > > Thanks. I've gone ahead and pushed it to gcc trunk for you as r14- > 3552-g29763b002459cb. > > [...snip...] > > Dave >