linux-4.5-rc3/arch/arc/kernel/unwind.c:629: undefined behaviour ?

David Binderman dcb314 at hotmail.com
Mon Feb 8 05:37:25 PST 2016


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