All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicola Vetrini <nicola.vetrini@bugseng.com>
To: Julien Grall <julien@xen.org>
Cc: Jan Beulich <jbeulich@suse.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Xen-devel <xen-devel@lists.xenproject.org>,
	consulting@bugseng.com,
	Stefano Stabellini <sstabellini@kernel.org>,
	Bertrand Marquis <bertrand.marquis@arm.com>,
	roger.pau@citrix.com, George Dunlap <george.dunlap@citrix.com>,
	Wei Liu <wl@xen.org>
Subject: Re: MISRA C:2012 D4.11 caution on staging
Date: Wed, 18 Oct 2023 14:30:03 +0200	[thread overview]
Message-ID: <8c25bfd7768d6b290362f56a8b8d44d9@bugseng.com> (raw)
In-Reply-To: <3573c8c2-1a9c-444c-a542-539b16f689f2@xen.org>

On 17/10/2023 15:28, Julien Grall wrote:
> Hi Jan,
> 
> On 17/10/2023 07:11, Jan Beulich wrote:
>> On 16.10.2023 20:06, Julien Grall wrote:
>>> Instead, it would be best to find a way to help Eclair to detect this 
>>> is
>>> not an issue and also improve readability. Would the following help 
>>> Eclair?
>>> 
>>> diff --git a/xen/common/domain.c b/xen/common/domain.c
>>> index 30c227967345..ab16124eabd6 100644
>>> --- a/xen/common/domain.c
>>> +++ b/xen/common/domain.c
>>> @@ -671,6 +671,8 @@ struct domain *domain_create(domid_t domid,
>>> 
>>>        if ( !is_idle_domain(d) )
>>>        {
>>> +        ASSERT(config);
>>> +
>>>            watchdog_domain_init(d);
>>>            init_status |= INIT_watchdog;
>> 
>> Just to mention it: Even if right now it turned out to help, it 
>> wouldn't
>> once release builds are also checked.
> 
> Indeed. I thought about it when writing the e-mail yesterday. I have
> the feeling that we are not getting many similar report today thanks
> to the various ASSERT().
> 
> This may mean that the ASSERT() will have to be kept during static
> analysis or we deviate/add proper error checking.
> 
> Cheers,

I tested this, and the report is prevented by the ASSERT. It's up to the 
maintainers to
decide how do you want to proceed: my suggestion is deviating it, and 
then when someone
has the time to fix this with proper error handling remove the 
deviation.

-- 
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)


  reply	other threads:[~2023-10-18 12:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-10  9:31 MISRA C:2012 D4.11 caution on staging Nicola Vetrini
2023-10-11  0:01 ` Stefano Stabellini
2023-10-13  9:23   ` Julien Grall
2023-10-11  0:15 ` Andrew Cooper
2023-10-11  7:47   ` Nicola Vetrini
2023-10-11  7:51     ` Andrew Cooper
2023-10-13  9:27       ` Julien Grall
2023-10-13 15:11         ` Nicola Vetrini
2023-10-16 18:06           ` Julien Grall
2023-10-17  6:11             ` Jan Beulich
2023-10-17 13:28               ` Julien Grall
2023-10-18 12:30                 ` Nicola Vetrini [this message]
2023-10-18 12:38                   ` Julien Grall
2023-10-18 12:52                     ` Nicola Vetrini
2023-10-18 13:02                       ` Julien Grall
2023-10-18 21:33                         ` Stefano Stabellini
2023-10-23 10:34                           ` Nicola Vetrini

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=8c25bfd7768d6b290362f56a8b8d44d9@bugseng.com \
    --to=nicola.vetrini@bugseng.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=bertrand.marquis@arm.com \
    --cc=consulting@bugseng.com \
    --cc=george.dunlap@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.