[PATCH] D63694: [lld/WebAssembly] Slightly nicer error message for malformed input files
Keno Fischer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 25 17:12:37 PDT 2019
loladiro added a comment.
In D63694#1558350 <https://reviews.llvm.org/D63694#1558350>, @sbc100 wrote:
> Ideally I'd rather see the invalid file be generated on the fly, but this is also ok since it should never really change.
>
> What about the actual test that checks for the error string? I imagine the binary would go in "Inputs" and the `.test` would be a text file that checks for the error.
The test file is just
\00asm
; RUN: not wasm-ld -o %t.wasm.out %s %s 2>&1 | FileCheck %s
; This file is an invalid input file with wasm magic (\00asm).
; We test that the filename is printed in the error path.
; CHECK: error:
; CHECK: corrupted.wasm.test: Bad version number
I suppose fabricator has some sort of binary detection that doens't like the leading zero byte.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63694/new/
https://reviews.llvm.org/D63694
More information about the llvm-commits
mailing list