Stream: git-wasmtime

Topic: wasmtime / PR #8173 PCC: add facts to all relevant iconst...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 18 2024 at 20:29):

cfallin requested elliottt for a review on PR #8173.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 18 2024 at 20:29):

cfallin opened PR #8173 from cfallin:fix-pcc-iconst to bytecodealliance:main:

We have various constant-propagation/folding rules in the mid-end that generate new iconsts in place of other expressions. We got a fuzzbug with PCC wherein it was not able to verify that an iadd-iadd-uextend combination generating a Wasm address was in-range when rules reassociated the iadds to put constants together. Rather than carefully augment all rules to propagate constant facts only where they exist on the inputs, I opted to add a hook to the optimizer to generate brand-new assertions on all iconsts that we insert. This adds a little more work during verification (not too much hopefully: it's pretty low-overhead to check that mov $1, %rax puts 1 in rax) but should provide broader coverage of interesting corner-cases where optimization breaks the PCC chain.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=67432.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Mar 18 2024 at 20:29):

cfallin requested wasmtime-compiler-reviewers for a review on PR #8173.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 19 2024 at 00:23):

jameysharp submitted PR review:

This one is easy enough to reason about: it passes the flags through so we can check whether we're using PCC, and if we are, it does what the commit message says.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 19 2024 at 01:14):

cfallin merged PR #8173.


Last updated: Oct 23 2024 at 20:03 UTC