Unverified Commit 1bb85fa9 authored by Joseph Huber's avatar Joseph Huber Committed by GitHub
Browse files

[libc] Lock the output stream for the 'puts' call (#76513)

Summary:
The `puts` function consists of an initial write and then another write
to append the newline. When executing code in parallel, it is possible
for these writes to becomes disjointed. This code adds an explicit lock
call to ensure that the string is always appended by the newline as the
users expects.

Wasn't sure if this required a test as it would be difficult since
reproducing it would be flaky.
parent fc9dbc99
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment