Files
mesa/bin
Vinson Lee 191e4b8fe0 bin/symbols-check: Fix undefined symbol detection on macOS
Commit e626636e90 ("bin/symbols-check: fix fields length condition
before accessing fields") changed the condition from `or` to `and`
to prevent potential IndexError when accessing fields[1].

However, this broke macOS because `nm -gP` outputs different field
counts for undefined symbols:
- Linux:  `_symbol U`           (2 fields)
- macOS:  `_symbol U 0 0`       (4 fields)

The condition `len(fields) == 2 and fields[1] == 'U'` only matched
the Linux format, causing undefined symbols like
_mesa_glapi_tls_Dispatch to be incorrectly reported as
"unknown symbol exported" on macOS.

Fix by using `len(fields) >= 2` to handle both platforms while still
guarding against IndexError.

Fixes: e626636e90 ("bin/symbols-check: fix fields length condition before accessing fields")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13451
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38983>
2025-12-20 02:05:15 +00:00
..
2025-12-12 20:35:35 +00:00
2025-04-22 19:20:09 +00:00
2025-08-08 19:38:54 +00:00