numam-dpdk/lib/librte_eal
Adrien Mazarguil 6b298c6285 eal: fix signed integers in fbarray
While debugging startup issues encountered with Clang (see "eal: fix
undefined behavior in fbarray"), I noticed that fbarray stores indices,
sizes and masks on signed integers involved in bitwise operations.

Such operations almost invariably cause undefined behavior with values that
cannot be represented by the result type, as is often the case with
bit-masks and left-shifts.

This patch replaces them with unsigned integers as a safety measure and
promotes a few internal variables to larger types for consistency.

Coverity issue: 272598, 272599
Fixes: c44d09811b ("eal: add shared indexed file-backed array")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-04-17 14:38:16 +02:00
..
bsdapp vfio: export functions even when disabled 2018-04-16 19:33:46 +02:00
common eal: fix signed integers in fbarray 2018-04-17 14:38:16 +02:00
linuxapp vfio: export functions even when disabled 2018-04-16 19:33:46 +02:00
Makefile lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
meson.build eal: provide API for querying valid socket ids 2018-04-05 00:27:13 +02:00
rte_eal_version.map eal: add device event monitor framework 2018-04-13 12:00:31 +02:00