[debugserver] Fix debugserver build on < macOS 10.15#166599
Merged
JDevlieghere merged 2 commits intollvm:mainfrom Nov 5, 2025
Merged
[debugserver] Fix debugserver build on < macOS 10.15#166599JDevlieghere merged 2 commits intollvm:mainfrom
JDevlieghere merged 2 commits intollvm:mainfrom
Conversation
Member
|
@llvm/pr-subscribers-lldb Author: Jonas Devlieghere (JDevlieghere) ChangesThe VM_MEMORY_SANITIZER constant was added in macOs 10.15 and friends. Support using the constant on older OSes. Fixes #156144 1 Files Affected:
diff --git a/lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp b/lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp
index 9d0d60fdaaed9..34c5c9a025e5b 100644
--- a/lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp
+++ b/lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp
@@ -15,6 +15,11 @@
#include <cassert>
#include <mach/mach_vm.h>
+// From <mach/vm_statistics.h>, but not on older OSs.
+#ifndef VM_MEMORY_SANITIZER
+#define VM_MEMORY_SANITIZER 99
+#endif
+
MachVMRegion::MachVMRegion(task_t task)
: m_task(task), m_addr(INVALID_NUB_ADDRESS), m_err(),
m_start(INVALID_NUB_ADDRESS), m_size(0), m_depth(-1),
|
felipepiovezan
approved these changes
Nov 5, 2025
Contributor
felipepiovezan
left a comment
There was a problem hiding this comment.
Thanks for catching this!
The VM_MEMORY_SANITIZER was added in macOs 10.15 and friends. Support using the constant on older OSes. Fixes llvm#156144
65d5ed9 to
2d31f19
Compare
Member
Author
|
/cherry-pick bc55f4f |
Member
|
/pull-request #166614 |
dyung
pushed a commit
that referenced
this pull request
Nov 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The VM_MEMORY_SANITIZER constant was added in macOs 10.15 and friends. Support using the constant on older OSes.
Fixes #156144