Hi!
> (resend, cc Andrey)
>
> On Sun, 7 Apr 2019 12:53:25 + Vadim Pasternak
> wrote:
>
> > The warning is caused by call to rorXX(), if the second parameters of
> > this function "shift" is zero. In such case UBSAN reports the warning
> > for the next expression: (word << (XX - shift),
On 09/04/2019 10.08, Rasmus Villemoes wrote:
> one could do
>
> u32 ror32(u32 x, unsigned s)
> {
> return (x >> (s&31)) | (x << ((32-s)&31));
> }
>
> to make the shifts always well-defined and also work as expected for s
> >= 32... if only gcc recognized that the masking is redundant, so
On 09/04/2019 00.52, Andrew Morton wrote:
> (resend, cc Andrey)
>
> On Sun, 7 Apr 2019 12:53:25 + Vadim Pasternak
> wrote:
>
>> The warning is caused by call to rorXX(), if the second parameters of
>> this function "shift" is zero. In such case UBSAN reports the warning
>> for the next
ct: Re: [PATCH v1 bitops] bitops: Fix UBSAN undefined behavior warning
> for rotation right
>
> (resend, cc Andrey)
>
> On Sun, 7 Apr 2019 12:53:25 + Vadim Pasternak
> wrote:
>
> > The warning is caused by call to rorXX(), if the second parameters of
> >
(resend, cc Andrey)
On Sun, 7 Apr 2019 12:53:25 + Vadim Pasternak wrote:
> The warning is caused by call to rorXX(), if the second parameters of
> this function "shift" is zero. In such case UBSAN reports the warning
> for the next expression: (word << (XX - shift), where XX is
> 64, 32,
On Sun, 7 Apr 2019 12:53:25 + Vadim Pasternak wrote:
> The warning is caused by call to rorXX(), if the second parameters of
> this function "shift" is zero. In such case UBSAN reports the warning
> for the next expression: (word << (XX - shift), where XX is
> 64, 32, 16, 8 for respectively
The warning is caused by call to rorXX(), if the second parameters of
this function "shift" is zero. In such case UBSAN reports the warning
for the next expression: (word << (XX - shift), where XX is
64, 32, 16, 8 for respectively ror64, ror32, ror16, ror8.
Fix adds validation of this parameter -
7 matches
Mail list logo