================ @@ -500,19 +502,16 @@ bool CommandObjectExpression::EvaluateExpression(llvm::StringRef expr, void CommandObjectExpression::IOHandlerInputComplete(IOHandler &io_handler, std::string &line) { io_handler.SetIsDone(true); - StreamFileSP output_sp = io_handler.GetOutputStreamFileSP(); - StreamFileSP error_sp = io_handler.GetErrorStreamFileSP(); + LockedStreamFile locked_output_stream = + io_handler.GetOutputStreamFileSP()->Lock(); + LockedStreamFile locked_error_stream = + io_handler.GetErrorStreamFileSP()->Lock(); ---------------- labath wrote:
We probably don't want to hold this locked while the expression is being evaluated. (Although I also don't know why does this function take streams to begin with. It seems like it could just print everything into the return object). https://github.com/llvm/llvm-project/pull/126630 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits