This was causing large addresses to be emitted as negative numbers,
which rightfully caused crashes in binaryen.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lld/test/wasm/data-segments.ll | ||
---|---|---|
91 ↗ | (On Diff #209392) | It'd be better if we can get disassembly, but it seems to be not fully working yet |
lld/wasm/Writer.cpp | ||
661 ↗ | (On Diff #209392) | Isn't [[ https://github.com/llvm/llvm-project/blob/c46d78d1b7a06aad11f8810279271224fc8466af/lld/wasm/OutputSegment.h#L39 | OutputSegment::startVA ]] already a uint32_t? |
lld/test/wasm/data-segments.ll | ||
---|---|---|
44 ↗ | (On Diff #209392) | How does this change test the logic change? Seems like 10000 isn't large enough to trigger the binaryen crash? |
lld/test/wasm/data-segments.ll | ||
---|---|---|
44 ↗ | (On Diff #209392) | 1000 encoded as unsigned leb in hex is 904E, bu as a signed leb it is 90CE00. The need to leave room for a sign bit bumps the encoding up to use the next byte. |
91 ↗ | (On Diff #209392) | +1 |
lld/wasm/Writer.cpp | ||
661 ↗ | (On Diff #209392) | Good catch, this was left over from some previous experimentation. |