diff options
| author | 2026-04-01 17:07:27 +0200 | |
|---|---|---|
| committer | 2026-04-04 10:48:14 +0200 | |
| commit | fd2e9f820005d63769a6662c276b1f52a72ed041 (patch) | |
| tree | ef797258355c1b2ae85820e88c544203eba7b68e /samples/kobject/ssh:/git@git.zx2c4.com | |
| parent | tools/nolibc: use makedev() in fstatat() (diff) | |
tools/nolibc: use __builtin_offsetof()
The current custom implementation of offsetof() fails UBSAN:
runtime error: member access within null pointer of type 'struct ...'
This means that all its users, including container_of(), free() and
realloc(), fail.
Use __builtin_offsetof() instead which does not have this issue and
has been available since GCC 4 and clang 3.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Willy Tarreau <w@1wt.eu>
Link: https://patch.msgid.link/20260401-nolibc-asprintf-v1-1-46292313439f@weissschuh.net
Diffstat (limited to 'samples/kobject/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
