From patchwork Thu Jul 11 13:36:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Oliva X-Patchwork-Id: 1959371 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=OykcCagy; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WKbPq45Jmz1xqr for ; Thu, 11 Jul 2024 23:37:35 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B43FB387088C for ; Thu, 11 Jul 2024 13:37:32 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by sourceware.org (Postfix) with ESMTPS id 20D65384A050 for ; Thu, 11 Jul 2024 13:37:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 20D65384A050 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 20D65384A050 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::629 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720705031; cv=none; b=r9SurTs5a0oJLJanQSd1S4nzb4VEl1OXsSWNDdEt0s+GU02V4RVai+adOz0vql80DdlW0i1XNpeR/bqZ8Il9KhhtAmOP3tkBpxo8bSy+heoUG1sKO7z8a2raKcDh27XIBRIJdSlcK+3rJOTsLesZ1AM8xnI8mG2AJy7/xuenCqE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720705031; c=relaxed/simple; bh=5Tl4mWzl6d95vCisrcTZwH2ZtQeuptgVZPcCaNVGTz4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=EJlxVy0YlW+r37LzeCI1NtyIBf5ainARNkpNeq4gsQD4N+4P+k7s3OCVPCcW8OdrDUNJSbLHOZ7Pc9CwdXEzF6mj4yi5guu2yhoSQGhnu1IW+/6fsmPtoBAxuEbMucGGRlo1QN6pm4fZpO52n1ybbffb/P0TtpDVXqkIt//Krms= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1fb05b0be01so5844585ad.2 for ; Thu, 11 Jul 2024 06:37:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1720705029; x=1721309829; darn=gcc.gnu.org; h=mime-version:message-id:date:user-agent:organization:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=dBCwQREjO+O9xLZorN3IOXWSuxoKh+BEWo25E+BbXBg=; b=OykcCagy634JnUv5wYhl2oWac/EJZ+WRFlIy/EA7HvVxmn0AJdnwgiO9qPdMR/81hV 5Dof7gvwlV8roQhTiNRr3TcXuBJuCYr5//aZkD5R5LabbSL/zKUEtFPjLOiQ4ZPNCMkA n+0LJTiulW5RWmV8sGLVT0LfSrHQVOsKfT8O8mbcwlTwsuAVarZgfZFjauj+ToViwqvb WmrcnVr8t1ixfRpDOrxdah+y8FehZeoxAZ0g/YUV7wCDn69mEhz2yN/+p9rZGLRQ+1n/ c2QobuCCMqIl79O5+90LoMfoQMY66JZN/Zslpdi/5u9ifmbhhNgQj7BurnjN9lXWHoRL UWpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720705029; x=1721309829; h=mime-version:message-id:date:user-agent:organization:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dBCwQREjO+O9xLZorN3IOXWSuxoKh+BEWo25E+BbXBg=; b=mO2Bpc3EnwwGl46aftdkM8ASD7pU5MgDUGaWB2R8JMRuJ/66EnPHI+QMIe9WX/vcG6 chJBFW7B8M2N4WHa5YjHGstcDvYharAoNx622TZWoBebQQIPN+r/Dn2XBoqQFDeDdK3z aCcWYt7HLQ9FkfDItpATxHC/KQUeLMgju4l/ZA2gHYjwS2ZxZ3AM+LMpT1LcEJQtDcuI Sp9Rse0VGD+RG/ZvD+lssddZKHGZ3FpYRDPcHyuyJcNatKDbm/gk2IdA38GQkjzsxJxV OCxuHKg/uxQEh0tc4ayfmlJQXrJCJApGP/+5q2ryIjRb2CRrrUfXMQp2IFpSeaHkh33l WxHA== X-Gm-Message-State: AOJu0YyZeCYp9954ChaKrxDzp3NulnsWuclbIheu+7PWsIjrq+UZz94y OpJ8uIhM3FoJbppDBtiqHchzytD3M1+9hWujQIcYrsrrEB3Q/BGUSFhgT8O9ZxvvEskHaeree6R nkQ== X-Google-Smtp-Source: AGHT+IGkR7zli3JbH6CSdsN6K2BVWw6TtpbatGca2uVi+H8BK9174cje2hAYRbB7T8+nO9XtJmU2TQ== X-Received: by 2002:a17:902:db07:b0:1fb:48c6:a2b0 with SMTP id d9443c01a7336-1fbb6d34bf1mr66043335ad.5.1720705028992; Thu, 11 Jul 2024 06:37:08 -0700 (PDT) Received: from free.home ([2804:7f1:218a:d53f:1f12:68c4:3c4:d64a]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fbb6ab6e40sm50358185ad.169.2024.07.11.06.37.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jul 2024 06:37:08 -0700 (PDT) Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id 46BDapeQ003378 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 11 Jul 2024 10:36:52 -0300 From: Alexandre Oliva To: gcc-patches@gcc.gnu.org Cc: dmalcolm@redhat.com Subject: [PATCH] [analyzer] [testsuite] avoid unexpected null dereference warning Organization: Free thinker, does not speak for AdaCore User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Date: Thu, 11 Jul 2024 10:36:51 -0300 Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, WEIRD_QUOTING 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: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org The analyzer testsuite, on a customer's own operating system, reports a potential NULL pointer dereference in flex-without-call-summaries.c. I'm not sure why it shows up on that system, but not on others, but the test is not meant to test for that warning, so I'm silencing it. Regstrapped on x86_64-linux-gnu, also tested with gcc-13 targeting aarch64. Ok to install? for gcc/testsuite/ChangeLog * c-c++-common/analyzer/flex-without-call-summaries.c: Disable null dereference analyzer warnings. --- .../analyzer/flex-without-call-summaries.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/testsuite/c-c++-common/analyzer/flex-without-call-summaries.c b/gcc/testsuite/c-c++-common/analyzer/flex-without-call-summaries.c index c6ecb25d25d59..1aad2bc896b7e 100644 --- a/gcc/testsuite/c-c++-common/analyzer/flex-without-call-summaries.c +++ b/gcc/testsuite/c-c++-common/analyzer/flex-without-call-summaries.c @@ -3,6 +3,7 @@ /* { dg-additional-options "-fno-analyzer-call-summaries" } */ +/* { dg-additional-options "-Wno-analyzer-null-dereference" } */ /* { dg-additional-options "-Wno-analyzer-too-complex" } */ /* { dg-additional-options "-D_POSIX_SOURCE" } */