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
..
ci crnm: clean uncolored job status 2025-12-12 20:35:35 +00:00
pick
.editorconfig
__init__.py
commit_in_branch.py
commit_in_branch_test.py
flamegraph_map_lp_jit.py
gen_calendar_entries.py
gen_calendar_entries_test.py
gen_release_notes.py bin/gen_release_notes: Remove duplicate bug entires 2025-11-17 22:45:13 +00:00
gen_release_notes_test.py bin/gen_release_notes: Remove duplicate bug entires 2025-11-17 22:45:13 +00:00
gen_vs_module_defs.py
git_sha1_gen.py Revert "meson: use vcs_tag() instead of custom script" 2025-10-06 23:06:11 +00:00
install_megadrivers.py
khronos-update.py
meson-cmd-extract.py
meson.build Revert "meson: use vcs_tag() instead of custom script" 2025-10-06 23:06:11 +00:00
nir-test-runner.py
people.csv people: Add Christoph Pillmayer to the list 2025-12-12 10:03:02 +01:00
perf-annotate-jit.py
pick-ui.py
pick-ui.sh
post_version.py
post_version_test.py
python-venv.sh
rb.py
refcnt-log-helper.py
renderdoc-update.py
symbols-check.py bin/symbols-check: Fix undefined symbol detection on macOS 2025-12-20 02:05:15 +00:00
toml_lint.py
update-android-headers.sh