[PATCH] Verify sizes when trying to read a BitcodeAbbrevOp

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Tue Apr 21 10:23:38 PDT 2015


================
Comment at: include/llvm/Bitcode/BitstreamReader.h:215
@@ -214,1 +214,3 @@
 
+  size_t MaxChunkSize() { return sizeof(word_t) * 8; }
+
----------------
getMaxChunkSize.

Or just make this a constant. It doesn't need to be a function, right?

================
Comment at: test/Bitcode/invalid.test:59
@@ +58,3 @@
+
+RUN: not llvm-dis -disable-output %p/Inputs/invalid-VBR-too-big.bc 2>&1 | \
+RUN:   FileCheck --check-prefix=HUGE-VBR %s
----------------
If you have a testcase handy for the 4 cases, please add them.

http://reviews.llvm.org/D9030

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list