Skip to content
Commit ff426a62 authored by Karl-Johan Karlsson's avatar Karl-Johan Karlsson
Browse files

[compiler-rt] Fix signed integer overflow in int_mulo_impl.inc

When compiling compiler-rt with -fsanitize=undefined and running testcases you
end up with the following warning:

UBSan:/repo/uabkaka/llvm-project/compiler-rt/lib/builtins/int_mulo_impl.inc:24:23: signed integer overflow: -1 * -2147483648 cannot be represented in type 'si_int' (aka 'long')

This can be avoided by doing the multiplication in a matching unsigned variant
of the type.

This was found in an out of tree target.

Reviewed By: phosek

Differential Revision: https://reviews.llvm.org/D146623
parent 2a6e39db
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment