Break on nullptr return address in UnwindImpl on RISC-V

PiperOrigin-RevId: 914222352
Change-Id: Iff9028a38e878465961f71e90484c2a62ed89132
This commit is contained in:
Abseil Team
2026-05-12 05:12:35 -07:00
committed by Copybara-Service
parent 5704b72fe0
commit 33bbc26609
3 changed files with 27 additions and 4 deletions

View File

@@ -378,4 +378,14 @@ TEST(StackTrace, NestedSignal) {
}
#endif
TEST(StackTrace, NoNullptrInPopulatedRange) {
constexpr int kMaxDepth = 1024;
void* results[kMaxDepth];
int depth = absl::GetStackTrace(results, kMaxDepth, 0);
for (int i = 0; i < depth; ++i) {
EXPECT_NE(results[i], nullptr) << "Unexpected nullptr found at index " << i;
}
}
} // namespace