[PATCH] Avoid crash reading bitcode files with bad abbrev record (bug 20485)
David Callahan
dcallahan at fb.com
Thu Jan 15 16:36:48 PST 2015
REPOSITORY
rL LLVM
================
Comment at: tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp:415
@@ +414,3 @@
+ if(Stream.ReadAbbrevRecord())
+ return Error("malformed bitcode file");
+
----------------
rafael wrote:
> Ah, so you have a diagnostic here. Please move it down to where the problem is first detected. That should allow you to print a better message.
I chose to put the diagnostic here because that was more consistent with prior use of the API and in particular there are other clients in llvm/tools/clang (with a separate revision) that have different diagnostic needs.
http://reviews.llvm.org/D7003
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list