Skip to content
Commit ed0577cc authored by Artem Belevich's avatar Artem Belevich
Browse files

Fixed double-free in case of module loading error.

GetOutputStream() owns the stream it returns pointer to and the
pointer should never be freed by us. When we fail to load and exit
early, unique_ptr still holds the pointer and frees it which leads to
compiler crash when CompilerInstance attempts to free it again.

Added regression test for failed bitcode linking.

Differential Revision: http://reviews.llvm.org/D9625

llvm-svn: 237159
parent 38bb81db
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment