[all-commits] [llvm/llvm-project] a335f3: [lldb] Always lock in StreamLogHandler::Write (#20...
Raphael Isemann via All-commits
all-commits at lists.llvm.org
Fri Jun 26 03:22:43 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a335f334f512be44ac02a07ffae27468d246a07d
https://github.com/llvm/llvm-project/commit/a335f334f512be44ac02a07ffae27468d246a07d
Author: Raphael Isemann <rise at apple.com>
Date: 2026-06-26 (Fri, 26 Jun 2026)
Changed paths:
M lldb/source/Utility/Log.cpp
Log Message:
-----------
[lldb] Always lock in StreamLogHandler::Write (#205771)
This code assumes that writing to an unbuffered raw_fd_ostream from
multiple threads is somehow safe. raw_fd_ostream doesn't make any
guarantees about this from what I can see.
The current raw_fd_ostream implementation also uses a looping write call
to write the content in chunks, and doing this from multiple threads
leads to interleaving log messages.
This patch unconditionally make us aquire the stream lock.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list