Stream: git-wasmtime

Topic: wasmtime / PR #3229 Fix determinism of compiled modules


view this post on Zulip Wasmtime GitHub notifications bot (Aug 23 2021 at 18:39):

alexcrichton opened PR #3229 from deterministic to main:

Currently wasmtime's compilation artifacts are not deterministic due to
the usage of HashMap during serialization which has randomized order
of its elements. This commit fixes that by switching to a sorted
BTreeMap for various maps. A test is also added to ensure determinism.

If in the future the performance of BTreeMap is not as good as
HashMap for some of these cases we can implement a fancier
serialize_with-style solution where we sort keys during serialization,
but only during serialization and otherwise use a HashMap.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Aug 23 2021 at 19:10):

peterhuene submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 23 2021 at 20:05):

alexcrichton updated PR #3229 from deterministic to main.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 23 2021 at 20:05):

alexcrichton updated PR #3229 from deterministic to main.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 23 2021 at 22:08):

alexcrichton merged PR #3229.


Last updated: Dec 23 2024 at 12:05 UTC