about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2016-12-29 17:26:39 -0800
committerGitHub <noreply@github.com>2016-12-29 17:26:39 -0800
commit3e36dd89819762732572a8d69a0faec2bfd10ebf (patch)
treeec00701669a5358f538c2d6df5e8906ac85238e7 /src/rustllvm/RustWrapper.cpp
parentc41256c36f8da6eb04a2bae0d5629c624c6939a9 (diff)
parent8d50857a6fd38669d85d85ba5172c6262430f4af (diff)
downloadrust-3e36dd89819762732572a8d69a0faec2bfd10ebf.tar.gz
rust-3e36dd89819762732572a8d69a0faec2bfd10ebf.zip
Rollup merge of #38676 - rkruppe:llvm-check-success, r=alexcrichton
Check *all* errors in LLVMRustArchiveIterator* API

Incrementing the `Archive::child_iterator` fetches and validates the next child.
This can trigger an error, which we previously checked on the *next* call to `LLVMRustArchiveIteratorNext()`.
This means we ignore the last error if we stop iterating halfway through.
This is harmless (we don't access the child, after all) but LLVM 4.0 calls `abort()` if *any* error goes unchecked, even a success value.
This means that basically any rustc invocation that opens an archive and searches through it would die.

The solution implemented here is to change the order of operations, such that
advancing the iterator and fetching the newly-validated iterator happens in the same `Next()` call.
This keeps the error handling behavior as before but ensures all `Error`s get checked.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions