[Lldb-commits] [lldb] 9c4c67a - [lldb][test] LogTest: Fix stack overflow
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Thu Jun 8 09:10:40 PDT 2023
Author: Michael Buch
Date: 2023-06-08T17:10:32+01:00
New Revision: 9c4c67a682f9d9b2cca183fcb9533bf709ffa723
URL: https://github.com/llvm/llvm-project/commit/9c4c67a682f9d9b2cca183fcb9533bf709ffa723
DIFF: https://github.com/llvm/llvm-project/commit/9c4c67a682f9d9b2cca183fcb9533bf709ffa723.diff
LOG: [lldb][test] LogTest: Fix stack overflow
The expected function name requires 18 bytes of storage.
Caught by the public ASAN buildbot
Differential Revision: https://reviews.llvm.org/D152454
Added:
Modified:
lldb/unittests/Utility/LogTest.cpp
Removed:
################################################################################
diff --git a/lldb/unittests/Utility/LogTest.cpp b/lldb/unittests/Utility/LogTest.cpp
index d3c878d3ea718..1dac19486a8f7 100644
--- a/lldb/unittests/Utility/LogTest.cpp
+++ b/lldb/unittests/Utility/LogTest.cpp
@@ -309,7 +309,7 @@ TEST_F(LogChannelEnabledTest, log_options) {
Err));
llvm::StringRef Msg = logAndTakeOutputf("Hello World");
char File[12];
- char Function[17];
+ char Function[18];
sscanf(Msg.str().c_str(),
"%[^:]:%s Hello World", File,
More information about the lldb-commits
mailing list