diff options
author | Artem Belevich <tra@google.com> | 2015-05-12 17:44:15 +0000 |
---|---|---|
committer | Artem Belevich <tra@google.com> | 2015-05-12 17:44:15 +0000 |
commit | ed0577cc6d3a15b4951111e5565a2964b85ab8f4 (patch) | |
tree | 7ccf306aac19f3dbc9f2c3c3e2146277ed5b7e99 /llvm/lib/Support/DataStream.cpp | |
parent | 38bb81db85da12af346922808ae52fa577aafa90 (diff) | |
download | bcm5719-llvm-ed0577cc6d3a15b4951111e5565a2964b85ab8f4.tar.gz bcm5719-llvm-ed0577cc6d3a15b4951111e5565a2964b85ab8f4.zip |
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
Diffstat (limited to 'llvm/lib/Support/DataStream.cpp')
0 files changed, 0 insertions, 0 deletions