linux-4.5-rc3/arch/arc/kernel/unwind.c:629: undefined behaviour ?
David Binderman
dcb314 at hotmail.com
Fri May 20 01:17:18 PDT 2016
Hello there,
----------------------------------------
> What compiler are you using - for me it builds clean here !
A static C/C++ code analyser called cppcheck. Available from sourceforge.
I find it very useful for all C/C++ development.
Regards
David Binderman
>
> -Vineet
>
> On Monday 08 February 2016 07:07 PM, David Binderman wrote:
>> Hello there,
>>
>> [linux-4.5-rc3/arch/arc/kernel/unwind.c:629]: (warning) Invalid test for overflow 'ptr+len<ptr'. Condition is always false unless there is overflow, and overflow is Undefined Behaviour.
>>
>> Source code is
>>
>> if (ptr + len < ptr || ptr + len> end)
>> return -1;
>>
>> Suggest code rework.
>>
>>
>> Regards
>>
>> David Binderman
>>
>>
>
More information about the linux-snps-arc
mailing list