Skip to content
Commit 72d5e41a authored by Radoslaw Burny's avatar Radoslaw Burny Committed by Andrei Vagin
Browse files

sfds: Fix UB in choose_service_fd_base due to calling __builtin_clz(0)

__builtin_clz(0) leads to undefined behaviour:
https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html

Set nr = 1 directly to avoid this.

Link: https://github.com/checkpoint-restore/criu/issues/470


Signed-off-by: default avatarRadoslaw Burny <rburny@google.com>
Acked-by: default avatarKirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: default avatarAndrei Vagin <avagin@virtuozzo.com>
parent f872b431
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment