From patchwork Wed Nov 15 10:59:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 165279 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp2457520vqg; Wed, 15 Nov 2023 02:59:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IFangNnjBzJCz7gPzQlZlfOKlMCHznc4vzmXlePTCeRbYGBGiHOgO541glGbaYFIhuhJcKy X-Received: by 2002:a05:622a:188f:b0:421:ad0b:fe5a with SMTP id v15-20020a05622a188f00b00421ad0bfe5amr6003195qtc.2.1700045987376; Wed, 15 Nov 2023 02:59:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700045987; cv=pass; d=google.com; s=arc-20160816; b=y9UxKX/QGQso9lJnQXPPKy3hOEUVp/Q/1WJVtoBWkBgvir0/vvj7hAerasQ6HKoaHC Q4ahc6QT0gGWEYcGfP1zExyCykc1W+DRx8ar2KRtMM3wHkMCrfM1Tv0yIQxX3L25QEOV TiKy5uwcF2cNGlKpz+UOBdRJWPfq+2eVtAUVZBJh4CwLmuEGK4PN2By5BQmce/4VJ2In jE8SDEBKAoonF/7GRUORdbo8m3fK/fHB9ypKuHK3yp22Rj9uP2mM3RUVcRTnpNzWdD60 ZwVuNo+fgCu/XE7g8aJXH9ubZmVGu/EHfDseqLRSCDBADrgC/DgSgl7QvVansFahO7XK KVQA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:reply-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=vXil8TZofhX7T1dA+gm8TcjZGAOqmcMaor0oGqYJwaQ=; fh=gQl4idKbq/nX3us5twaqDssuTOMIFQPDS+MWz3jC+os=; b=o92KqKqD6H964GHUtWVigfBEQpK7N/0a18G8P3vjQARVtB/ZEjCEsWSrUw3YizpB5i XoiZN2/gmPGlbHI86/35bg1es7X+2ZwNc9/8+nuuvv7C64674qZ6FcvGncDALR4ogN82 6fLa3iCe3/nBQgPEzF9cRj322OimB+IEozS+UMT336AJSUfcxpChMr6wjnn2wnBQ51Nn FBsCxNTiaAAzZXcdBOVQ/aY9e6MfiYD1KSIMIEKypavmq0ZN08w0fK/2TpMrsPy7kdLk 4ZJSDObogkfewHGI1dNmmTW5sHyjfZeeWve5dLFCkcr5HKkrX9CzCdFLd/9gCzReLEBx QIMQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Ufs7BL1/"; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id s27-20020a05622a1a9b00b0040fdcdae9d5si8280844qtc.4.2023.11.15.02.59.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 02:59:47 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Ufs7BL1/"; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2C26A3858419 for ; Wed, 15 Nov 2023 10:59:47 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 9A56D3858D20 for ; Wed, 15 Nov 2023 10:59:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9A56D3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9A56D3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700045964; cv=none; b=Ex7BQ0hSSqJM2PB0kTX/k/5TZgS+xePvLGIYOLbP8iqEgGyRxNp2kN9KGqWVRJuMTwcpPLLhsturx99yjevq5+T38QMTf8YdAqZiCyPQIRoWvmSD1jqSqPHOwHq9FGN+LTZk98xl2OJVRvoMUkrj6tO/+in2Ndt1KJTVvr+9Gjg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700045964; c=relaxed/simple; bh=C+CxijXg3glIU6rIO9k6Ha/vfVt4s1trel4K5jL9BnE=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=KwWwCYtOcPPJpLSWMSb1Oz+pUVFQCbCOazUAnleB2esslU7n43PZUBHo6AocRhNWtYyXfhYUJ6OtPuuLj18yfRo8IqrE8/AxJ0cIwjN5Rez1ALCZ9AIZQMUInH3iqo0Cq5sgoQ7I11sJRG0H7DmZUgH11HbFYO/SXJwEm3Ma33w= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700045963; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type; bh=vXil8TZofhX7T1dA+gm8TcjZGAOqmcMaor0oGqYJwaQ=; b=Ufs7BL1/lQ4t3kSA3LauL9SWzkTCjJ0N/fmaybaoIe4VZ9YpCWCnkjmPgwcm/UtXf75PTM RmIvzMQoFyxDlhS9OOjpgx+hxHOngoV//hU9GWRk6W8SrsgVQACYxRo2IaQ6vJ0sPYoHtu 7CbMscYXTDGXL2qHgv4co8qRRr7XLvE= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-442-wy-if1SWO9GTpGnHlSfCYg-1; Wed, 15 Nov 2023 05:59:18 -0500 X-MC-Unique: wy-if1SWO9GTpGnHlSfCYg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 32A8B381A88A; Wed, 15 Nov 2023 10:59:18 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.194.53]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E251D36EE; Wed, 15 Nov 2023 10:59:17 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 3AFAxFvh285845 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 15 Nov 2023 11:59:15 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 3AFAxDbM285844; Wed, 15 Nov 2023 11:59:13 +0100 Date: Wed, 15 Nov 2023 11:59:13 +0100 From: Jakub Jelinek To: Richard Biener Cc: gcc-patches@gcc.gnu.org, Iain Sandoe , Jeff Law Subject: [PATCH 3/4] libsanitizer: Adjust the asan/sanity-check-pure-c-1.c test Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782627421310209294 X-GMAIL-MSGID: 1782627421310209294 Hi! The updated libasan doesn't print __interceptor_free (or __interceptor_malloc) but free (or malloc), the following patch adjusts the testcase so that it accepts it. 2023-11-15 Jakub Jelinek * c-c++-common/asan/sanity-check-pure-c-1.c: Adjust for interceptor_ or wrap_ substrings possibly not being emitted in newer libasan. Jakub --- gcc/testsuite/c-c++-common/asan/sanity-check-pure-c-1.c.jj 2020-01-14 20:02:46.646611886 +0100 +++ gcc/testsuite/c-c++-common/asan/sanity-check-pure-c-1.c 2023-11-15 10:51:50.921621770 +0100 @@ -10,7 +10,7 @@ int main() { } /* { dg-output "heap-use-after-free.*(\n|\r\n|\r)" } */ -/* { dg-output " #0 \[^\n\r]*(in _*(interceptor_|wrap_)free|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */ +/* { dg-output " #0 \[^\n\r]*(in _*(interceptor_|wrap_)?free|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */ /* { dg-output " #1 \[^\n\r]*(in _*main (\[^\n\r]*sanity-check-pure-c-1.c:8|\[^\n\r]*:0)|\[(\]).*(\n|\r\n|\r)" } */ -/* { dg-output " #0 \[^\n\r]*(in _*(interceptor_|wrap_)malloc|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */ +/* { dg-output " #0 \[^\n\r]*(in _*(interceptor_|wrap_)?malloc|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */ /* { dg-output " #1 \[^\n\r]*(in _*main (\[^\n\r]*sanity-check-pure-c-1.c:7|\[^\n\r]*:0)|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */