[PATCH] D43684: [WebAssembly] Add validation to reloc section

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 28 14:07:10 PST 2018


sbc100 added inline comments.


================
Comment at: test/ObjectYAML/wasm/code_section.yaml:53
+        Flags:           [  ]
+        Function:        1
 ...
----------------
ncw wrote:
> sbc100 wrote:
> > What is this adding the to the test?  Presumably you might want to add new tests to check the failure cases?   
> It's adding to the test since the test contains a file with relocations but no symbol table (so it's an invalid file).
> 
> You're right, I could add tests for exercising our handling of bad Wasm files... but we currently have very very few tests for bad Wasm files. What's the policy - is it our intention to have tests for all the various cases of illegal Wasm files?
> 
> I guess we would ideally, I'll add a test for the new error messages I've put in.
Oh I see.  You mean that added these validations caused these tests to start failing?   In that case yes, I think these test changes makes sense to be part of this CL.   Perhaps mention that in the description.


Repository:
  rL LLVM

https://reviews.llvm.org/D43684





More information about the llvm-commits mailing list