From patchwork Sat May 8 22:00:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1475924 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=fKcUcTdg; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Fd1Wb4wqZz9tlZ for ; Sun, 9 May 2021 08:02:19 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 04E9A82E95; Sun, 9 May 2021 00:01:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="fKcUcTdg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C909C82E88; Sun, 9 May 2021 00:00:58 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0F20282E92 for ; Sun, 9 May 2021 00:00:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd2d.google.com with SMTP id v123so11287053ioe.10 for ; Sat, 08 May 2021 15:00:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3OfKSckp1ktGrs0DKI9aJTY7gB0z9saWmwGWNkzNwKY=; b=fKcUcTdgqKTPGcclceYcYyW+lLPMD/dVuCAOuR0vkfhIHlduEwQVy4QkrFRDSNMYUi 7gcHFMaKBqZSraYxAu/OsdtVSalOZQfm2SSh/ceciOwGCxNmLyKwy6AkUFJsInot+rMt A6CED4xEIe5vVr0KlvxeqhZ5KbDviMIqlQGJQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3OfKSckp1ktGrs0DKI9aJTY7gB0z9saWmwGWNkzNwKY=; b=kBYlC4329zeZ7h0+EWBvPAtUgaefvMq577bI0eRZ3tydeVRb7n4OuXlZa6pA0UYxr5 Nx6R5dcIaEKwjBEwhQY78UPRbNRGj4H+mVS7buD2od5PoZU2aAiSbOHYo7iubFZcsvYP d1mRfPbQbSPloD86NsjQRbaIeCYqNNp9cMW7Dqa8AdQTLDKDaignqmLBA8GU79pTsQV7 jUDhQNm3Ad5KrcBh6e/Rg0RZMyiL8sX8qn59GtZ1cUHpXqfe/Q2tOeWjyiHGE1Lymceb n7lRe0ZuIWobTVNcWMpK6jHPHdfhrYQ3GpZWsestSp6oOaG8xHL6Efw2HUsJ3pACRgeV SAvg== X-Gm-Message-State: AOAM530gDLHQAsR64ys/MEablHPYxVQ+FI5B7HGbQyMCSZd1r2U0dZfI BJ9ysgZLnsRE4Z4KtXz7kaHonG98rh7bkVvj X-Google-Smtp-Source: ABdhPJzgtCg2poMes4kVYx84+BT34olznpv21Zb0sRqadVlf5KiJn5Wh5yC+imDO7vrDKUT9nY0nsw== X-Received: by 2002:a05:6638:13cc:: with SMTP id i12mr15085181jaj.20.1620511229611; Sat, 08 May 2021 15:00:29 -0700 (PDT) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id t7sm5195196ile.87.2021.05.08.15.00.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 May 2021 15:00:29 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Heinrich Schuchardt Subject: [PATCH 03/17] sandbox: Indicate NULL-pointer access in 'sigsegv' command Date: Sat, 8 May 2021 16:00:07 -0600 Message-Id: <20210508220021.1778080-4-sjg@chromium.org> X-Mailer: git-send-email 2.31.1.607.g51e8a6a459-goog In-Reply-To: <20210508220021.1778080-1-sjg@chromium.org> References: <20210508220021.1778080-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean This is intended to crash. Add an annotation to keep coverity happy. Reported-by: Coverity (CID: 316347) Signed-off-by: Simon Glass --- cmd/sandbox/exception.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/sandbox/exception.c b/cmd/sandbox/exception.c index 1aa1d673aed..d865922e863 100644 --- a/cmd/sandbox/exception.c +++ b/cmd/sandbox/exception.c @@ -13,7 +13,9 @@ static int do_sigsegv(struct cmd_tbl *cmdtp, int flag, int argc, { u8 *ptr = NULL; + /* coverity[FORWARD_NULL] */ *ptr = 0; + return CMD_RET_FAILURE; }