rupprecht accepted this revision.
rupprecht added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lldb/source/Host/posix/ProcessLauncherPosixFork.cpp:293
+    r = llvm::sys::RetryAfterSignal(-1, read, pipe.GetReadFileDescriptor(), 
pos,
+                                    buf.end() - pos);
+  } while (r > 0);
----------------
labath wrote:
> rupprecht wrote:
> > IIUC, this will overrun the buffer if there are >1000 bytes to read; 
> > whereas previously we just wouldn't have read everything.
> > 
> > Should each loop iteration grow the buffer by a certain amount? Otherwise I 
> > think we need to remove the loop.
> It won't overrun because I am passing the remaining part of the buffer as the 
> size argument. However, I am not totally sure what would happen if we 
> actually filled the buffer (and size becomes zero).  That won't happen right 
> now because the error string is coming from `ExitWithError` (line 50) and its 
> length is limited by the longest errno message. That said, the dynamical 
> resize is quite simple in this case, so I might as well do it.
Thanks! I still think it's good to be dynamic in case this assumption changes 
one day, and the error string ends up being longer than 1000 bytes.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133352/new/

https://reviews.llvm.org/D133352

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to