[PATCH] D47204: [WebAssembly] Properly calculate function body offset, and write I32 values.

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 22 11:54:03 PDT 2018


sbc100 added a comment.

In https://reviews.llvm.org/D47204#1108297, @ruiu wrote:

> Was the test in that change was failing on your machine? If it passed (if it happened to work), you still need to change the test, so that it fails without this patch and passes with this patch.


There are two parts to this change.  The `write32le()` is there for correctness but really could be replaces with llvm_unreachable since this relocation type should never occur in the code section today.

The second fix which was to pass the correct argument to `decodeULEB128()` is hard to write a test for.  It a used of uninitialized memory which should really have been caught be msan (do we run that on any bots?, perhaps not with wasm enabled?).    Its hard to write a failing test because of this and I'm not sure unit tests are the best way to check these types of failures.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D47204





More information about the llvm-commits mailing list