[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] misra: tailor the definition of Rule 12.2 to C standard types


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Dmytro Prokopchuk1 <dmytro_prokopchuk1@xxxxxxxx>
  • Date: Thu, 17 Jul 2025 08:55:03 +0000
  • Accept-language: en-US, uk-UA, ru-RU
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=I2zHv1/6a68qFfzDrraCK1/l1C7WPXJIVfQCjKFw9ws=; b=Eay9kf7PuTY0xEhWmgeG+5nR3u5Y5VtSQS3qGEIm5gCUanOcvkNUVkTB/NStX/xO+BdPjbEn+H6q4cHYHzDMFa9jzw4dxmRe9mwOpND9dipKWNCSow5QlSxAHuKnyvq8E1bK/mTU2Wp2Phi7zBLOnjHAn05R3kKkfFMCIwSZC/V7pcDA2Z3wXWx6Yi5Du8rRS6KurNhEy6jhYxIQiCmdJbpgsOBQY+o+M8Am0L+dSdhRA0k8bc32iRYjAW1xtxKkpBXBOV1tL5JftqQftCnV7zAJOl92Ry7PJo6oPWwT3gNak1hwsSdi9xjLz+jHq94dOlFEm4dkYnMEE0K+ICnR3Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FO1w8Tng84y0jq7bIfac6VdTE4bB4W/3cQEVTv9SEQ4rJZEq3+6LihtS+U/Y51qqojLd7uIS6+Yu2j4aYD5bCTAVuC0qgSJOHxcv5F1unecQcy7FyFaeiXfjD5M6EVzXLjl8fSDqofjk7RUfOpnZ6hUhYALFqmLacacqL3SuaCD0yoRFdGTruSW6TvAnQTlIz7ZiCbOM+i9IIfT32YZ3z0oIjrMndFAPeOIr6nBhysO6p61VwIJYKBQF1XKaeXZF7Y0kIJU6qbOOykfHguqiEdxokKyHG2FxK7iBZGaPbuyn1w+79dBJQ1WgzBuuqqfAj+OMQ/ioOrwguO94lP2BIA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>, Doug Goldstein <cardoe@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Thu, 17 Jul 2025 08:55:10 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHb9kpD31dTcYF/7UCF8hLOSjEN6rQ1gkOAgABeDICAACQUgA==
  • Thread-topic: [PATCH] misra: tailor the definition of Rule 12.2 to C standard types


On 7/17/25 09:45, Jan Beulich wrote:
> On 17.07.2025 03:09, Stefano Stabellini wrote:
>> On Wed, 16 Jul 2025, Dmytro Prokopchuk1 wrote:
>>> From: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
>>>
>>> The definition of MISRA C Rule 12.2 ("The right hand operand of a shift
>>> operator shall lie in the range zero to one less than the width in bits
>>> of the essential type of the left hand operand") is concerned with the
>>> essential type of an expression, while the C Undefined Behaviour is
>>> related to C standard types, which may be wider but not narrower than
>>> the MISRA C essential type. For this reason, it is safe to consider the
>>> C standard type, rather than the essential type when checking the rule.
>>>
>>> To avoid regressions, tag the rule as clean and add it to the
>>> monitored set.
>>>
>>> Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
>>
>> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> 
> I was about to commit this, but Dmytro - your S-o-b is missing.
> 
> Jan
Sorry about that. Added.

Dmytro

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.