Skip to content

release/21.x: [debugserver] Fix debugserver build on < macOS 10.15 (#166599)#166614

Merged
dyung merged 1 commit intollvm:release/21.xfrom
llvmbot:issue166599
Nov 11, 2025
Merged

release/21.x: [debugserver] Fix debugserver build on < macOS 10.15 (#166599)#166614
dyung merged 1 commit intollvm:release/21.xfrom
llvmbot:issue166599

Conversation

@llvmbot
Copy link
Copy Markdown
Member

@llvmbot llvmbot commented Nov 5, 2025

Backport bc55f4f

Requested by: @JDevlieghere

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)
@llvmbot
Copy link
Copy Markdown
Member Author

llvmbot commented Nov 5, 2025

@felipepiovezan What do you think about merging this PR to the release branch?

@llvmbot
Copy link
Copy Markdown
Member Author

llvmbot commented Nov 5, 2025

@llvm/pr-subscribers-lldb

Author: None (llvmbot)

Changes

Backport bc55f4f

Requested by: @JDevlieghere


Full diff: https://github.com/llvm/llvm-project/pull/166614.diff

1 Files Affected:

  • (modified) lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp (+6)
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(),

@dyung dyung moved this from Needs Triage to Needs Merge in LLVM Release Status Nov 7, 2025
@dyung dyung merged commit 4b2ac3f into llvm:release/21.x Nov 11, 2025
11 checks passed
@github-project-automation github-project-automation Bot moved this from Needs Merge to Done in LLVM Release Status Nov 11, 2025
@github-actions
Copy link
Copy Markdown

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Development

Successfully merging this pull request may close these issues.

4 participants