[llvm] [WebAssembly] Limit increase of Ctx.End (PR #76676)

Sam Clegg via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 5 11:39:58 PST 2024


sbc100 wrote:

> This looks good to me in general. I think I like the idea of using the unittest framework for testing parsing of possibly malformed binary files (as opposed to the alternative of checking in binary files somewhere like llvm/test/Object). @sbc100 does this seem reasonable to you?

I'm not sure which is best.  Our existing tests for this kind of thing currently live in `llvm/test/Object/`.  e.g. https://github.com/llvm/llvm-project/blob/f9aba820eb6478a617145eb690ba8b06490d7ac5/llvm/test/Object/wasm-bad-symbol-type.test#L1.

One nice think about checking in the binaries is that its easy to read and modify them.  For example, I could take `llvm/test/Object/Inputs/WASM/bad-symbol-type.wasm` and run it though objdump.  This is not true for this hex string embedded in the unittest sources.



https://github.com/llvm/llvm-project/pull/76676


More information about the llvm-commits mailing list