ashgti wrote:
> If this is a feature you actually rely on, we should check the fd is valid
> before we use it. As in: check and if it's invalid early return an error,
> instead of getting all the way to reading from it.
The start of the `ReadFull` helper is checking `IsValid()`:
```
static Expected<std::string>
ReadFull(IOObject &descriptor, size_t length,
std::optional<std::chrono::microseconds> timeout = std::nullopt) {
if (!descriptor.IsValid())
return llvm::make_error<TransportInvalidError>();
```
The `IOObject` in the test should be a `NativeFile`, I wonder if there is a
problem in the windows implementation of that?
https://github.com/llvm/llvm-project/pull/143946
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits