Author: Walter Erquinigo Date: 2021-07-12T13:22:25-07:00 New Revision: 8ea1a630d66f4d70a7177c6eb522a3efff21b1be
URL: https://github.com/llvm/llvm-project/commit/8ea1a630d66f4d70a7177c6eb522a3efff21b1be DIFF: https://github.com/llvm/llvm-project/commit/8ea1a630d66f4d70a7177c6eb522a3efff21b1be.diff LOG: [vscode] fix ubsan problem in the progress event reporter The error UndefinedBehaviorSanitizer: undefined-behavior /Users/buildslave/jenkins/workspace/lldb-cmake-sanitized/llvm-project/lldb/tools/lldb-vscode/ProgressEvent.cpp:89:64 in was found in https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-sanitized/1910/consoleFull#-15641370498254eaf0-7326-4999-85b0-388101f2d404 It turns out that we were not setting m_event_type when initializatin and update case. The fix is very simple. Differential Revision: https://reviews.llvm.org/D105832 Added: Modified: lldb/tools/lldb-vscode/ProgressEvent.cpp Removed: ################################################################################ diff --git a/lldb/tools/lldb-vscode/ProgressEvent.cpp b/lldb/tools/lldb-vscode/ProgressEvent.cpp index d973a578c2538..5c1f8c63ebefc 100644 --- a/lldb/tools/lldb-vscode/ProgressEvent.cpp +++ b/lldb/tools/lldb-vscode/ProgressEvent.cpp @@ -47,6 +47,7 @@ ProgressEvent::ProgressEvent(uint64_t progress_id, Optional<StringRef> message, m_percentage = 100; } else { // Update event + m_event_type = progressUpdate; m_percentage = std::min( (uint32_t)((double)completed / (double)total * 100.0), (uint32_t)99); if (prev_event->Reported()) { _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits