Skip to content

Conversation

Michael137
Copy link
Member

@Michael137 Michael137 commented Mar 26, 2025

When hitting a sanitizer breakpoint, LLDB currently displays the frame in the sanitizer dylib (which we usually don't have debug-info for), which isn't very helpful to the user. A more helpful frame to display would be the first frame not in the sanitizer library (we have a similar heuristic when we trap inside libc++). This patch does just that, by implementing the GetSuggestedStackFrameIndex API

Depends on #133078

@llvmbot
Copy link
Member

llvmbot commented Sep 3, 2025

@llvm/pr-subscribers-lldb

Author: Michael Buch (Michael137)

Changes

When hitting a sanitizer breakpoint, LLDB currently displays the frame in the sanitizer dylib (which we usually don't have debug-info for), which isn't very helpful to the user. A more helpful frame to display would be the first frame not in the sanitizer library (we have a similar heuristic when we trap inside libc++). This patch does just that, by implementing the GetSuggestedStackFrameIndex API

Depends on #133078


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

8 Files Affected:

  • (modified) lldb/include/lldb/Target/InstrumentationRuntimeStopInfo.h (+3)
  • (modified) lldb/include/lldb/Target/StackFrameList.h (+2)
  • (modified) lldb/include/lldb/Target/Thread.h (+4)
  • (modified) lldb/source/Target/InstrumentationRuntimeStopInfo.cpp (+42)
  • (modified) lldb/source/Target/Process.cpp (+2)
  • (modified) lldb/test/API/functionalities/asan/TestMemoryHistory.py (+4)
  • (modified) lldb/test/API/functionalities/asan/TestReportData.py (+4)
  • (modified) lldb/test/API/functionalities/ubsan/basic/TestUbsanBasic.py (+2-2)
diff --git a/lldb/include/lldb/Target/InstrumentationRuntimeStopInfo.h b/lldb/include/lldb/Target/InstrumentationRuntimeStopInfo.h
index 5345160850914..dafa41c11327a 100644
--- a/lldb/include/lldb/Target/InstrumentationRuntimeStopInfo.h
+++ b/lldb/include/lldb/Target/InstrumentationRuntimeStopInfo.h
@@ -24,6 +24,9 @@ class InstrumentationRuntimeStopInfo : public StopInfo {
     return lldb::eStopReasonInstrumentation;
   }
 
+  std::optional<uint32_t>
+  GetSuggestedStackFrameIndex(bool inlined_stack) override;
+
   const char *GetDescription() override;
 
   bool DoShouldNotify(Event *event_ptr) override { return true; }
diff --git a/lldb/include/lldb/Target/StackFrameList.h b/lldb/include/lldb/Target/StackFrameList.h
index 8a66296346f2d..be6ec3b09d8aa 100644
--- a/lldb/include/lldb/Target/StackFrameList.h
+++ b/lldb/include/lldb/Target/StackFrameList.h
@@ -36,6 +36,8 @@ class StackFrameList {
   /// Get the frame at index \p idx. Invisible frames cannot be indexed.
   lldb::StackFrameSP GetFrameAtIndex(uint32_t idx);
 
+  void ResetSuggestedStackFrameIndex() { m_selected_frame_idx.reset(); }
+
   /// Get the first concrete frame with index greater than or equal to \p idx.
   /// Unlike \ref GetFrameAtIndex, this cannot return a synthetic frame.
   lldb::StackFrameSP GetFrameWithConcreteFrameIndex(uint32_t unwind_idx);
diff --git a/lldb/include/lldb/Target/Thread.h b/lldb/include/lldb/Target/Thread.h
index 1d1e3dcfc1dc6..747d7299025f8 100644
--- a/lldb/include/lldb/Target/Thread.h
+++ b/lldb/include/lldb/Target/Thread.h
@@ -433,6 +433,10 @@ class Thread : public std::enable_shared_from_this<Thread>,
     return GetStackFrameList()->GetFrameAtIndex(idx);
   }
 
+  virtual void ResetSuggestedStackFrameIndex() {
+    return GetStackFrameList()->ResetSuggestedStackFrameIndex();
+  }
+
   virtual lldb::StackFrameSP
   GetFrameWithConcreteFrameIndex(uint32_t unwind_idx);
 
diff --git a/lldb/source/Target/InstrumentationRuntimeStopInfo.cpp b/lldb/source/Target/InstrumentationRuntimeStopInfo.cpp
index 7f82581cc601e..1daeebdbaf9c7 100644
--- a/lldb/source/Target/InstrumentationRuntimeStopInfo.cpp
+++ b/lldb/source/Target/InstrumentationRuntimeStopInfo.cpp
@@ -8,13 +8,20 @@
 
 #include "lldb/Target/InstrumentationRuntimeStopInfo.h"
 
+#include "lldb/Core/Module.h"
 #include "lldb/Target/InstrumentationRuntime.h"
 #include "lldb/Target/Process.h"
+#include "lldb/lldb-enumerations.h"
 #include "lldb/lldb-private.h"
 
 using namespace lldb;
 using namespace lldb_private;
 
+static bool IsStoppedInDarwinSanitizer(Thread &thread, Module &module) {
+  return module.GetFileSpec().GetFilename().GetStringRef().starts_with(
+      "libclang_rt.");
+}
+
 InstrumentationRuntimeStopInfo::InstrumentationRuntimeStopInfo(
     Thread &thread, std::string description,
     StructuredData::ObjectSP additional_data)
@@ -34,3 +41,38 @@ InstrumentationRuntimeStopInfo::CreateStopReasonWithInstrumentationData(
   return StopInfoSP(
       new InstrumentationRuntimeStopInfo(thread, description, additionalData));
 }
+
+std::optional<uint32_t>
+InstrumentationRuntimeStopInfo::GetSuggestedStackFrameIndex(
+    bool inlined_stack) {
+  auto thread_sp = GetThread();
+  if (!thread_sp)
+    return std::nullopt;
+
+  // Defensive upper-bound of when we stop walking up the frames in
+  // case we somehow ended up looking at an infinite recursion.
+  const size_t max_stack_depth = 128;
+
+  // Start at parent frame.
+  size_t stack_idx = 1;
+  StackFrameSP most_relevant_frame_sp =
+      thread_sp->GetStackFrameAtIndex(stack_idx);
+
+  while (most_relevant_frame_sp && stack_idx <= max_stack_depth) {
+    auto const &sc =
+        most_relevant_frame_sp->GetSymbolContext(lldb::eSymbolContextModule);
+
+    if (!sc.module_sp)
+      return std::nullopt;
+
+    // Found a frame outside of the sanitizer runtime libraries.
+    // That's the one we want to display.
+    if (!IsStoppedInDarwinSanitizer(*thread_sp, *sc.module_sp))
+      return stack_idx;
+
+    ++stack_idx;
+    most_relevant_frame_sp = thread_sp->GetStackFrameAtIndex(stack_idx);
+  }
+
+  return stack_idx;
+}
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index f2f5598f0ab53..f82cea2d668ed 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -4257,6 +4257,8 @@ bool Process::ProcessEventData::ShouldStop(Event *event_ptr,
         // appropriately. We also need to stop processing actions, since they
         // aren't expecting the target to be running.
 
+        thread_sp->ResetSuggestedStackFrameIndex();
+
         // FIXME: we might have run.
         if (stop_info_sp->HasTargetRunSinceMe()) {
           SetRestarted(true);
diff --git a/lldb/test/API/functionalities/asan/TestMemoryHistory.py b/lldb/test/API/functionalities/asan/TestMemoryHistory.py
index b04182a543719..03003f1e4112a 100644
--- a/lldb/test/API/functionalities/asan/TestMemoryHistory.py
+++ b/lldb/test/API/functionalities/asan/TestMemoryHistory.py
@@ -52,6 +52,10 @@ def libsanitizer_tests(self):
             substrs=["stopped", "stop reason = Use of deallocated memory"],
         )
 
+        # Make sure we're not stopped in the sanitizer library but instead at the
+        # point of failure in the user-code.
+        self.assertEqual(self.frame().GetFunctionName(), "main")
+
         # test the 'memory history' command
         self.expect(
             "memory history 'pointer'",
diff --git a/lldb/test/API/functionalities/asan/TestReportData.py b/lldb/test/API/functionalities/asan/TestReportData.py
index fabc985d0ed44..496a2db67c038 100644
--- a/lldb/test/API/functionalities/asan/TestReportData.py
+++ b/lldb/test/API/functionalities/asan/TestReportData.py
@@ -69,6 +69,10 @@ def asan_tests(self, libsanitizers=False):
             lldb.eStopReasonInstrumentation,
         )
 
+        # Make sure we're not stopped in the sanitizer library but instead at the
+        # point of failure in the user-code.
+        self.assertEqual(self.frame().GetFunctionName(), "main")
+
         self.expect(
             "bt",
             "The backtrace should show the crashing line",
diff --git a/lldb/test/API/functionalities/ubsan/basic/TestUbsanBasic.py b/lldb/test/API/functionalities/ubsan/basic/TestUbsanBasic.py
index 868a2864d2b5e..f46d167d910ea 100644
--- a/lldb/test/API/functionalities/ubsan/basic/TestUbsanBasic.py
+++ b/lldb/test/API/functionalities/ubsan/basic/TestUbsanBasic.py
@@ -52,8 +52,8 @@ def ubsan_tests(self):
             substrs=["1 match found"],
         )
 
-        # We should be stopped in __ubsan_on_report
-        self.assertIn("__ubsan_on_report", frame.GetFunctionName())
+        # We should not be stopped in the sanitizer library.
+        self.assertIn("main", frame.GetFunctionName())
 
         # The stopped thread backtrace should contain either 'align line'
         found = False

@Michael137 Michael137 force-pushed the lldb/asan-recognizer-combined branch from befd014 to 85f9488 Compare September 4, 2025 12:19
Michael137 added a commit that referenced this pull request Sep 8, 2025
…tion (#133078)

The motivation for this patch is that
`StopInfo::GetSuggestedStackFrameIndex` would not take effect for
`InstrumentationRuntimeStopInfo` (which we plan to implement in
#133079). This was happening
because the instrumentation runtime plugins would run utility
expressions as part of the stop that would set the
`m_selected_frame_idx`. This means `SelectMostRelevantFrame` was never
called, and we would not be able to report the selected frame via the
`StopInfo` object.

This patch makes sure we clear the `m_selected_frame_idx` to allow
`GetSuggestedStackFrameIndex` to take effect, regardless of what the
frame recognizers choose to do.
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Sep 8, 2025
…::PerformAction (#133078)

The motivation for this patch is that
`StopInfo::GetSuggestedStackFrameIndex` would not take effect for
`InstrumentationRuntimeStopInfo` (which we plan to implement in
llvm/llvm-project#133079). This was happening
because the instrumentation runtime plugins would run utility
expressions as part of the stop that would set the
`m_selected_frame_idx`. This means `SelectMostRelevantFrame` was never
called, and we would not be able to report the selected frame via the
`StopInfo` object.

This patch makes sure we clear the `m_selected_frame_idx` to allow
`GetSuggestedStackFrameIndex` to take effect, regardless of what the
frame recognizers choose to do.
@Michael137 Michael137 force-pushed the lldb/asan-recognizer-combined branch from 85f9488 to 8f3f629 Compare September 8, 2025 16:57
@Michael137 Michael137 enabled auto-merge (squash) September 8, 2025 16:57
@Michael137 Michael137 merged commit 879f40a into llvm:main Sep 8, 2025
9 checks passed
@Michael137 Michael137 deleted the lldb/asan-recognizer-combined branch September 8, 2025 17:04
@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 8, 2025

LLVM Buildbot has detected a new failure on builder cross-project-tests-sie-ubuntu running on doug-worker-1a while building lldb at step 6 "test-build-unified-tree-check-cross-project".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/181/builds/27444

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-cross-project) failure: test (failure)
******************** TEST 'cross-project-tests :: debuginfo-tests/dexter-tests/optnone-struct-and-methods.cpp' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
optnone-struct-and-methods.cpp: nan/nan (nan) [Command '['/usr/bin/python3.8', '/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/cross-project-tests/debuginfo-tests/dexter/dex/../dexter.py', 'run-debugger-internal-', '/tmp/lit-tmp-l306fh39/dexter/tmpi_3ukuqr/tmpkp72n71y', '--working-directory=/tmp/lit-tmp-l306fh39/dexter/tmpi_3ukuqr', '--unittest=off', '--indent-timer-level=3']' returned non-zero exit status 1.]
Command '['/usr/bin/python3.8', '/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/cross-project-tests/debuginfo-tests/dexter/dex/../dexter.py', 'run-debugger-internal-', '/tmp/lit-tmp-l306fh39/dexter/tmpi_3ukuqr/tmpkp72n71y', '--working-directory=/tmp/lit-tmp-l306fh39/dexter/tmpi_3ukuqr', '--unittest=off', '--indent-timer-level=3']' returned non-zero exit status 1.
--
Command Output (stderr):
--
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/bin/clang++ -std=gnu++11 -O2 -g /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/cross-project-tests/debuginfo-tests/dexter-tests/optnone-struct-and-methods.cpp -o /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/projects/cross-project-tests/debuginfo-tests/dexter-tests/Output/optnone-struct-and-methods.cpp.tmp # RUN: at line 1
+ /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/bin/clang++ -std=gnu++11 -O2 -g /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/cross-project-tests/debuginfo-tests/dexter-tests/optnone-struct-and-methods.cpp -o /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/projects/cross-project-tests/debuginfo-tests/dexter-tests/Output/optnone-struct-and-methods.cpp.tmp
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/cross-project-tests/debuginfo-tests/dexter-tests/optnone-struct-and-methods.cpp:69:22: warning: first argument in call to '__builtin_memset' is a pointer to non-trivially copyable type '(anonymous namespace)::A' [-Wnontrivial-memcall]
   69 |     __builtin_memset(this, 0xFF, sizeof(*this));
      |                      ^
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/cross-project-tests/debuginfo-tests/dexter-tests/optnone-struct-and-methods.cpp:69:22: note: explicitly cast the pointer to silence this warning
   69 |     __builtin_memset(this, 0xFF, sizeof(*this));
      |                      ^
      |                      (void*)
1 warning generated.
"/usr/bin/python3.8" "/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/cross-project-tests/debuginfo-tests/dexter/dexter.py" test --fail-lt 1.0 -w      --binary /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/projects/cross-project-tests/debuginfo-tests/dexter-tests/Output/optnone-struct-and-methods.cpp.tmp --lldb-executable "/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/bin/lldb-dap" --debugger lldb-dap --dap-message-log=/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/projects/cross-project-tests/debuginfo-tests/dexter-tests/Output/optnone-struct-and-methods.cpp.tmp.dap.log -v -- /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/cross-project-tests/debuginfo-tests/dexter-tests/optnone-struct-and-methods.cpp # RUN: at line 2
+ /usr/bin/python3.8 /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/cross-project-tests/debuginfo-tests/dexter/dexter.py test --fail-lt 1.0 -w --binary /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/projects/cross-project-tests/debuginfo-tests/dexter-tests/Output/optnone-struct-and-methods.cpp.tmp --lldb-executable /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/bin/lldb-dap --debugger lldb-dap --dap-message-log=/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/projects/cross-project-tests/debuginfo-tests/dexter-tests/Output/optnone-struct-and-methods.cpp.tmp.dap.log -v -- /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/cross-project-tests/debuginfo-tests/dexter-tests/optnone-struct-and-methods.cpp
note: Opening DAP server: /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/bin/lldb-dap
warning: DAP: Unknown support flag: $__lldb_version
warning: DAP: Unknown support flag: completionTriggerCharacters
warning: DAP: Unknown support flag: exceptionBreakpointFilters
warning: DAP: Unknown support flag: supportTerminateDebuggee
warning: DAP: Unknown support flag: supportsBreakpointLocationsRequest
warning: DAP: Unknown support flag: supportsCompletionsRequest
warning: DAP: Unknown support flag: supportsDelayedStackTraceLoading
warning: DAP: Unknown support flag: supportsExceptionFilterOptions
warning: DAP: Unknown support flag: supportsExceptionInfoRequest
warning: DAP: Unknown support flag: supportsModuleSymbolsRequest
warning: DAP: Unknown support flag: capabilities
-> {
  "type": "request",
  "command": "initialize",
  "arguments": {
    "clientID": "dexter",
    "adapterID": "lldb-dap",
    "pathFormat": "path",
    "linesStartAt1": true,
    "columnsStartAt1": true,
    "supportsVariableType": true,
    "supportsVariablePaging": true,
    "supportsRunInTerminalRequest": false
  },
  "seq": 1
}
<- {
...

Michael137 added a commit that referenced this pull request Sep 8, 2025
Since #133079 we no longer stop
in the stanitizer library when hitting a sanitizer breakpoint. Adjust
the test accordingly.
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Sep 8, 2025
Since llvm/llvm-project#133079 we no longer stop
in the stanitizer library when hitting a sanitizer breakpoint. Adjust
the test accordingly.
@@ -218,6 +222,10 @@ def compiler_rt_asan_tests(self):

self.check_traces()

# Make sure we're not stopped in the sanitizer library but instead at the
Copy link
Member

@DataCorrupted DataCorrupted Sep 8, 2025

Choose a reason for hiding this comment

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

@Michael137 Is this correct? This test compiler_rt_asan_tests runs on all platforms, but your heuristics in IsStoppedInDarwinSanitizer is for Darwin only?

In most CI this test is somehow disabled (maybe this is an issue as well?), but in my (totally not related) PR #157529 it keeps failing because the frame is __sanitizer::Die() not main

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah yea that should only apply on Darwin. Will correct that

Would be nice if we made it work on non-Darwin too but that's for later

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for fixing, the two tests in question are:

    lldb-api :: functionalities/asan/TestMemoryHistory.py
    lldb-api :: functionalities/asan/TestReportData.py

Randomly grabbed some jobs, seems like other PRs (e.g. #157534, cc @Michael137) are also affected by these two.

Copy link
Member Author

Choose a reason for hiding this comment

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

Should be fixed now. Let me know if you're still seeing issues

Michael137 added a commit that referenced this pull request Sep 8, 2025
…forms

The frame recognizer for the instrumentation runtimes (added in
#133079) only triggers on Darwin
for `libclang_rt`. Adjust the tests accordingly.
@Michael137
Copy link
Member Author

/cherry-pick 39572f5 879f40a bdf645b 5326b3b

@llvmbot
Copy link
Member

llvmbot commented Sep 8, 2025

/cherry-pick 39572f5 879f40a bdf645b 5326b3b

Error: Command failed due to missing milestone.

@Michael137 Michael137 added this to the LLVM 21.x Release milestone Sep 8, 2025
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Sep 8, 2025
…Darwin platforms

The frame recognizer for the instrumentation runtimes (added in
llvm/llvm-project#133079) only triggers on Darwin
for `libclang_rt`. Adjust the tests accordingly.
@github-project-automation github-project-automation bot moved this to Needs Triage in LLVM Release Status Sep 8, 2025
@Michael137
Copy link
Member Author

/cherry-pick 39572f5 879f40a bdf645b 5326b3b

@ZequanWu
Copy link
Contributor

ZequanWu commented Sep 8, 2025

We started to seeing test failure (TestMemoryHistory.py) after this change:

/usr/bin/python3 /usr/local/google/home/zequanwu/work/llvm-project/lldb/test/API/dotest.py --arch x86_64 -u CXXFLAGS -u CFLAGS --build-dir /usr/local/google/home/zequanwu/work/llvm-project/out/cmake/lldb-test-build.noindex --executable /usr/local/google/home/zequanwu/work/llvm-project/out/cmake/./bin/lldb --compiler /usr/local/google/home/zequanwu/work/llvm-project/out/cmake/./bin/clang --dsymutil /usr/local/google/home/zequanwu/work/llvm-project/out/cmake/./bin/dsymutil --make /usr/bin/gmake --lldb-libs-dir /usr/local/google/home/zequanwu/work/llvm-project/out/cmake/./lib --llvm-tools-dir /usr/local/google/home/zequanwu/work/llvm-project/out/cmake/./bin --lldb-obj-root /usr/local/google/home/zequanwu/work/llvm-project/out/cmake/tools/lldb --cmake-build-type Release -p TestMemoryHistory.py
lldb version 22.0.0git (git@github.com:ZequanWu/llvm-project.git revision 879f40ab041b31fa73b9b25e4ec9e06e810bc767)
  clang revision 879f40ab041b31fa73b9b25e4ec9e06e810bc767
  llvm revision 879f40ab041b31fa73b9b25e4ec9e06e810bc767
Skipping the following test categories: ['libc++', 'msvcstl', 'dsym', 'gmodules', 'debugserver', 'objc']
UNSUPPORTED: LLDB (/usr/local/google/home/zequanwu/work/llvm-project/out/cmake/bin/clang-x86_64) :: test_compiler_rt_asan_dsym (TestMemoryHistory.MemoryHistoryTestCase.test_compiler_rt_asan_dsym) (test case does not fall in any category of interest for this run)
AddressSanitizer report breakpoint hit. Use 'thread info -s' to get extended information about the report.
FAIL: LLDB (/usr/local/google/home/zequanwu/work/llvm-project/out/cmake/bin/clang-x86_64) :: test_compiler_rt_asan_dwarf (TestMemoryHistory.MemoryHistoryTestCase.test_compiler_rt_asan_dwarf)
AddressSanitizer report breakpoint hit. Use 'thread info -s' to get extended information about the report.
FAIL: LLDB (/usr/local/google/home/zequanwu/work/llvm-project/out/cmake/bin/clang-x86_64) :: test_compiler_rt_asan_dwo (TestMemoryHistory.MemoryHistoryTestCase.test_compiler_rt_asan_dwo)
UNSUPPORTED: LLDB (/usr/local/google/home/zequanwu/work/llvm-project/out/cmake/bin/clang-x86_64) :: test_libsanitizers_asan_dsym (TestMemoryHistory.MemoryHistoryTestCase.test_libsanitizers_asan_dsym) (test case does not fall in any category of interest for this run)
UNSUPPORTED: LLDB (/usr/local/google/home/zequanwu/work/llvm-project/out/cmake/bin/clang-x86_64) :: test_libsanitizers_asan_dwarf (TestMemoryHistory.MemoryHistoryTestCase.test_libsanitizers_asan_dwarf) (requires one of macosx, darwin, ios, tvos, watchos, bridgeos, iphonesimulator, watchsimulator, appletvsimulator)
UNSUPPORTED: LLDB (/usr/local/google/home/zequanwu/work/llvm-project/out/cmake/bin/clang-x86_64) :: test_libsanitizers_asan_dwo (TestMemoryHistory.MemoryHistoryTestCase.test_libsanitizers_asan_dwo) (requires one of macosx, darwin, ios, tvos, watchos, bridgeos, iphonesimulator, watchsimulator, appletvsimulator)
UNSUPPORTED: LLDB (/usr/local/google/home/zequanwu/work/llvm-project/out/cmake/bin/clang-x86_64) :: test_libsanitizers_traces_dsym (TestMemoryHistory.MemoryHistoryTestCase.test_libsanitizers_traces_dsym) (test case does not fall in any category of interest for this run)
UNSUPPORTED: LLDB (/usr/local/google/home/zequanwu/work/llvm-project/out/cmake/bin/clang-x86_64) :: test_libsanitizers_traces_dwarf (TestMemoryHistory.MemoryHistoryTestCase.test_libsanitizers_traces_dwarf) (requires one of macosx, darwin, ios, tvos, watchos, bridgeos, iphonesimulator, watchsimulator, appletvsimulator)
UNSUPPORTED: LLDB (/usr/local/google/home/zequanwu/work/llvm-project/out/cmake/bin/clang-x86_64) :: test_libsanitizers_traces_dwo (TestMemoryHistory.MemoryHistoryTestCase.test_libsanitizers_traces_dwo) (requires one of macosx, darwin, ios, tvos, watchos, bridgeos, iphonesimulator, watchsimulator, appletvsimulator)
======================================================================
FAIL: test_compiler_rt_asan_dwarf (TestMemoryHistory.MemoryHistoryTestCase.test_compiler_rt_asan_dwarf)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/google/home/zequanwu/work/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 1828, in test_method
    return attrvalue(self)
  File "/usr/local/google/home/zequanwu/work/llvm-project/lldb/packages/Python/lldbsuite/test/decorators.py", line 155, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/google/home/zequanwu/work/llvm-project/lldb/test/API/functionalities/asan/TestMemoryHistory.py", line 19, in test_compiler_rt_asan
    self.compiler_rt_asan_tests()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/local/google/home/zequanwu/work/llvm-project/lldb/test/API/functionalities/asan/TestMemoryHistory.py", line 227, in compiler_rt_asan_tests
    self.assertEqual(self.frame().GetFunctionName(), "main")
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '__sanitizer::Die()' != 'main'
- __sanitizer::Die()
+ main

Config=x86_64-/usr/local/google/home/zequanwu/work/llvm-project/out/cmake/bin/clang
======================================================================
FAIL: test_compiler_rt_asan_dwo (TestMemoryHistory.MemoryHistoryTestCase.test_compiler_rt_asan_dwo)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/google/home/zequanwu/work/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 1828, in test_method
    return attrvalue(self)
  File "/usr/local/google/home/zequanwu/work/llvm-project/lldb/packages/Python/lldbsuite/test/decorators.py", line 155, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/google/home/zequanwu/work/llvm-project/lldb/test/API/functionalities/asan/TestMemoryHistory.py", line 19, in test_compiler_rt_asan
    self.compiler_rt_asan_tests()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/local/google/home/zequanwu/work/llvm-project/lldb/test/API/functionalities/asan/TestMemoryHistory.py", line 227, in compiler_rt_asan_tests
    self.assertEqual(self.frame().GetFunctionName(), "main")
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '__sanitizer::Die()' != 'main'
- __sanitizer::Die()
+ main

Config=x86_64-/usr/local/google/home/zequanwu/work/llvm-project/out/cmake/bin/clang
----------------------------------------------------------------------
Ran 9 tests in 1.597s

FAILED (failures=2, skipped=7)

Update:
It's fixed at 5326b3b

@llvmbot
Copy link
Member

llvmbot commented Sep 8, 2025

/pull-request #157568

@llvmbot llvmbot moved this from Needs Triage to Done in LLVM Release Status Sep 8, 2025
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.

7 participants