1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00
llvm-mirror/test/Bitcode/invalid-record-strtab.ll
Florian Hahn 0966169859 [BitcodeReader] Validate Strtab before accessing.
This fixes a crash with invalid bitcode files that have records
referencing names in Strtab, but Strtab is not present or the index is
out-of-bounds.

This fixes the following clusterfuzz issue:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=29895

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D95554
2021-06-22 14:52:16 +01:00

6 lines
156 B
LLVM

; Bitcode with an invalid record that indexes a name outside of strtab.
; RUN: not llvm-dis %s.bc -o - 2>&1 | FileCheck %s
; CHECK: error: Invalid record