OSDN Git Service

[WebAssembly] Add validation to reloc section
authorNicholas Wilson <nicholas@nicholaswilson.me.uk>
Mon, 5 Mar 2018 13:32:38 +0000 (13:32 +0000)
committerNicholas Wilson <nicholas@nicholaswilson.me.uk>
Mon, 5 Mar 2018 13:32:38 +0000 (13:32 +0000)
commite0316ce24e5fca8ec644e96ba9208acc703395b3
tree88243ca85a462422a7f4b03092b8efa04ee15f0b
parent4a9afc559e4a6b0fd9854cbb0eb1e7e9267826c2
[WebAssembly] Add validation to reloc section

We now check relocations offsets are within range, and the relocation
index is valid.

Also updated tests which contained invalid Wasm files that were
previously not checked.

Differential Revision: https://reviews.llvm.org/D43684

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@326697 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Object/Wasm.h
lib/Object/WasmObjectFile.cpp
test/ObjectYAML/wasm/code_section.yaml
test/ObjectYAML/wasm/data_section.yaml