llvm-project
6121ee7e - [debuginfod] Abort cached file stream if request fails (#232038)

Commit
8 days ago
[debuginfod] Abort cached file stream if request fails (#232038) When an HTTP request fails while it already received some data, the cached file stream is never committed. Destroying it in that state raises a fatal error, crashing the program (see #184728). This PR adds an `abort` method that should be called in this situation before destroying the stream. For the default implementation, only the output stream is closed. For the `CacheStream` in `llvm::localCache`, the temporary file is discarded as well. The test is based on David's reproducer. Since WinHttp seems to discard the content-length header, I switched to timing out the response instead. Fixes #184728. This is still a bug for the symstore locator in lldb, but I'll fix that in a followup.
Author
Parents
Loading