Skip to content

[debugserver] Mark ASAN memory regions as "heap" #113968

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

felipepiovezan
Copy link
Contributor

This memory type is currently not handled, but it makes sense to mark it as a heap allocation in requests asking for memory region info.

This memory type is currently not handled, but it makes sense to mark it as a
heap allocation in requests asking for memory region info.
@llvmbot
Copy link
Member

llvmbot commented Oct 28, 2024

@llvm/pr-subscribers-lldb

Author: Felipe de Azevedo Piovezan (felipepiovezan)

Changes

This memory type is currently not handled, but it makes sense to mark it as a heap allocation in requests asking for memory region info.


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

1 Files Affected:

  • (modified) lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp (+2-1)
diff --git a/lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp b/lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp
index 60d4c3bc293a3c..97908b4acaf284 100644
--- a/lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp
+++ b/lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp
@@ -208,7 +208,8 @@ std::vector<std::string> MachVMRegion::GetMemoryTypes() const {
       m_data.user_tag == VM_MEMORY_MALLOC_LARGE_REUSABLE ||
       m_data.user_tag == VM_MEMORY_MALLOC_HUGE ||
       m_data.user_tag == VM_MEMORY_REALLOC ||
-      m_data.user_tag == VM_MEMORY_SBRK) {
+      m_data.user_tag == VM_MEMORY_SBRK ||
+      m_data.user_tag == VM_MEMORY_SANITIZER) {
     types.push_back("heap");
     if (m_data.user_tag == VM_MEMORY_MALLOC_TINY) {
       types.push_back("malloc-tiny");

Copy link
Collaborator

@jasonmolenda jasonmolenda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@felipepiovezan felipepiovezan merged commit 474234a into llvm:main Oct 28, 2024
6 of 7 checks passed
@felipepiovezan felipepiovezan deleted the felipe/implement_asan_memory_type_upstream branch October 28, 2024 22:02
felipepiovezan added a commit to felipepiovezan/llvm-project that referenced this pull request Oct 28, 2024
This memory type is currently not handled, but it makes sense to mark it
as a heap allocation in requests asking for memory region info.

(cherry picked from commit 474234a)
NoumanAmir657 pushed a commit to NoumanAmir657/llvm-project that referenced this pull request Nov 4, 2024
This memory type is currently not handled, but it makes sense to mark it
as a heap allocation in requests asking for memory region info.
felipepiovezan added a commit to felipepiovezan/llvm-project that referenced this pull request Nov 19, 2024
The underlying issue was fixed in:
llvm#113968
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants