[all-commits] [llvm/llvm-project] 62a6d6: [Sanitizers][Darwin] Correct iterating of MachO lo...
Mariusz Borsa via All-commits
all-commits at lists.llvm.org
Sun Mar 9 10:59:08 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 62a6d63d634d816a7d73ab7735176ad05b118c79
https://github.com/llvm/llvm-project/commit/62a6d63d634d816a7d73ab7735176ad05b118c79
Author: Mariusz Borsa <wrotki at msn.com>
Date: 2025-03-09 (Sun, 09 Mar 2025)
Changed paths:
M compiler-rt/lib/sanitizer_common/sanitizer_procmaps_mac.cpp
M compiler-rt/lib/sanitizer_common/tests/sanitizer_procmaps_mac_test.cpp
Log Message:
-----------
[Sanitizers][Darwin] Correct iterating of MachO load commands (#130161)
The condition to stop iterating so far was to look for load command cmd
field == 0. The iteration would continue past the commands area, and
would finally find lc->cmd ==0, if lucky. Or crash with bus error, if
out of luck.
Correcting this by limiting the number of iterations to the count
specified in mach_header(_64) ncmds field.
rdar://143903403
---------
Co-authored-by: Mariusz Borsa <m_borsa at apple.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list