public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH 03/17] sandbox: Indicate NULL-pointer access in 'sigsegv' command
Date: Mon, 10 May 2021 09:07:00 -0400	[thread overview]
Message-ID: <20210510130700.GA17669@bill-the-cat> (raw)
In-Reply-To: <20210508220021.1778080-4-sjg@chromium.org>

On Sat, May 08, 2021 at 04:00:07PM -0600, Simon Glass wrote:

> This is intended to crash. Add an annotation to keep coverity happy.
> 
> Reported-by: Coverity (CID: 316347)
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 
>  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;

For here and later on in the series, I would rather just mark some as
intentional in the dashboard and if it makes sense and isn't obvious
from the code (so not here, but elsewhere in this series) a comment
saying why we're doing something a static analysis tool is going to
catch.  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210510/a9b9eb4b/attachment.sig>

  reply	other threads:[~2021-05-10 13:07 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-08 22:00 [PATCH 00/17] Fix various coverity warnings Simon Glass
2021-05-08 22:00 ` [PATCH 01/17] sandbox: net: Ensure host name is always a valid string Simon Glass
2021-05-09  4:14   ` Ramon Fried
2021-05-08 22:00 ` [PATCH 02/17] video: Check return value in pwm_backlight_of_to_plat() Simon Glass
2021-05-08 22:00 ` [PATCH 03/17] sandbox: Indicate NULL-pointer access in 'sigsegv' command Simon Glass
2021-05-10 13:07   ` Tom Rini [this message]
2021-05-08 22:00 ` [PATCH 04/17] test: Rename final check in setexpr_test_backref() Simon Glass
2021-05-08 22:00 ` [PATCH 05/17] tools: Avoid showing return value of clock_gettime() Simon Glass
2021-05-08 22:00 ` [PATCH 06/17] reset: Avoid a warning in devm_reset_bulk_get_by_node() Simon Glass
2021-05-08 22:00 ` [PATCH 07/17] reset: Avoid a warning in devm_regmap_init() Simon Glass
2021-05-10  7:29   ` Pratyush Yadav
2021-05-08 22:00 ` [PATCH 08/17] test: Avoid random numbers in dm_test_devm_regmap() Simon Glass
2021-05-08 22:00 ` [PATCH 09/17] dm: core: Check uclass_get() return value when dumping Simon Glass
2021-05-08 22:00 ` [PATCH 10/17] sandbox: scmi: Indicate dead code for coverity Simon Glass
2021-05-08 22:00 ` [PATCH 11/17] sandbox: cros_ec: Update error handling when reading matrix Simon Glass
2021-05-08 22:00 ` [PATCH 12/17] cbfs: Check offset range when reading a file Simon Glass
2021-05-08 22:00 ` [PATCH 13/17] pinctrl: Avoid coverity warning when checking width Simon Glass
2021-05-08 22:00 ` [PATCH 14/17] tpm: Check outgoing command size Simon Glass
2021-05-08 22:00 ` [PATCH 15/17] sandbox: Silence coverity warning in state_read_file() Simon Glass
2021-05-08 22:00 ` [PATCH 16/17] clk: Detect failure to set defaults Simon Glass
2021-05-09  0:40   ` Sean Anderson
2021-05-10 16:28     ` Simon Glass
2021-05-10 23:28       ` Sean Anderson
2021-05-08 22:00 ` [PATCH 17/17] RFC: clk: Return error code from clk_set_default_get_by_id() Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210510130700.GA17669@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox