diff options
author | Julian Lettner <julian.lettner@apple.com> | 2021-01-06 12:41:40 -0800 |
---|---|---|
committer | Julian Lettner <julian.lettner@apple.com> | 2021-01-15 11:42:25 -0800 |
commit | 84de4faf4cae2885056c608db8256e9f039050b3 (patch) | |
tree | 46dca931dbebc64270b1603ae77836f2d310cf6f /llvm/lib/Transforms/Utils/BasicBlockUtils.cpp | |
parent | 86e604c4d68528478333a8901d7c79c09ca16fa8 (diff) | |
download | llvm-84de4faf4cae2885056c608db8256e9f039050b3.zip llvm-84de4faf4cae2885056c608db8256e9f039050b3.tar.gz llvm-84de4faf4cae2885056c608db8256e9f039050b3.tar.bz2 |
GetMacosAlignedVersion() fails if sysctl is not setup
`GetMacosAlignedVersion()` fails for ASan-ified launchd because the
sanitizer initialization code runs before `sysctl` has been setup by
launchd. In this situation, `sysctl kern.osproductversion` returns a
non-empty string that does not match our expectations of a
well-formatted version string.
Retrieving the kernel version (via `sysctl kern.osrelease`) still works,
so we can use it to add a fallback for this corner case.
Differential Revision: https://reviews.llvm.org/D94190
Diffstat (limited to 'llvm/lib/Transforms/Utils/BasicBlockUtils.cpp')
0 files changed, 0 insertions, 0 deletions