release/21.x: [debugserver] Fix debugserver build on < macOS 10.15 (#166599)#166614
Merged
dyung merged 1 commit intollvm:release/21.xfrom Nov 11, 2025
Merged
release/21.x: [debugserver] Fix debugserver build on < macOS 10.15 (#166599)#166614dyung merged 1 commit intollvm:release/21.xfrom
dyung merged 1 commit intollvm:release/21.xfrom
Conversation
The VM_MEMORY_SANITIZER constant was added in macOs 10.15 and friends. Support using the constant on older OSes. Fixes llvm#156144 (cherry picked from commit bc55f4f)
Member
Author
|
@felipepiovezan What do you think about merging this PR to the release branch? |
Member
Author
|
@llvm/pr-subscribers-lldb Author: None (llvmbot) ChangesBackport bc55f4f Requested by: @JDevlieghere 1 Files Affected:
diff --git a/lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp b/lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp
index 97908b4acaf28..18d254e76b917 100644
--- a/lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp
+++ b/lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp
@@ -14,6 +14,12 @@
#include "DNBLog.h"
#include <cassert>
#include <mach/mach_vm.h>
+#include <mach/vm_statistics.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(),
|
felipepiovezan
approved these changes
Nov 5, 2025
|
@JDevlieghere (or anyone else). If you would like to add a note about this fix in the release notes (completely optional). Please reply to this comment with a one or two sentence description of the fix. When you are done, please add the release:note label to this PR. |
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.
Backport bc55f4f
Requested by: @JDevlieghere