aboutsummaryrefslogtreecommitdiff
path: root/scripts/bpf_doc.py
diff options
context:
space:
mode:
authorWilly Tarreau <[email protected]>2021-10-24 19:28:16 +0200
committerPaul E. McKenney <[email protected]>2021-11-30 17:26:42 -0800
commitde0244ae40ae91145faaf164a4252347607c3711 (patch)
tree8203af4dc0b5ec4f3935ea1549a3e159e27e7a70 /scripts/bpf_doc.py
parentebbe0d8a449d183fa43b42d84fcb248e25303985 (diff)
tools/nolibc: fix incorrect truncation of exit code
Ammar Faizi reported that our exit code handling is wrong. We truncate it to the lowest 8 bits but the syscall itself is expected to take a regular 32-bit signed integer, not an unsigned char. It's the kernel that later truncates it to the lowest 8 bits. The difference is visible in strace, where the program below used to show exit(255) instead of exit(-1): int main(void) { return -1; } This patch applies the fix to all archs. x86_64, i386, arm64, armv7 and mips were all tested and confirmed to work fine now. Risc-v was not tested but the change is trivial and exactly the same as for other archs. Reported-by: Ammar Faizi <[email protected]> Cc: [email protected] Signed-off-by: Willy Tarreau <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
Diffstat (limited to 'scripts/bpf_doc.py')
0 files changed, 0 insertions, 0 deletions