tests: Generate random values in unsigned integer space

When we're doing bitwise operations, addition with wraparound and
large left-shifts, it seems safer to use unsigned integers, where
the effect of overflow is well-defined (it wraps around). Signed
integer overflow is undefined behaviour, so compilers are free to
optimize by assuming that it cannot happen.

Detected by the undefined behaviour sanitizer (UBSan).

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie 2018-08-31 19:01:03 +01:00
parent 000ef530e8
commit 3241b4fe56

File diff suppressed because it is too large Load diff