Stream: git-wasmtime

Topic: wasmtime / issue #10639 Non-deterministic builds from `OU...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 22 2025 at 13:41):

adambratschikaye opened issue #10639:

Full paths in generate error messages are preventing us from producing deterministic build artifacts.

This is similar to https://github.com/bytecodealliance/wasmtime/issues/9553 and https://github.com/bytecodealliance/wasmtime/pull/9580. When generating term constructors here certain cases produce an unreachable! call which embeds the source code file path in the error message. When this is applied to the rules for emit_ret_gpr, emit_ret_xmm and defer_side_effect generated here, we end up with the full path (including OUT_DIR) of the generated files embedded in the resulting binary which makes builds non-deterministic.

I'm happy to put up a fix, either by trying to remove the OUT_DIR prefix or only including the path when a certain env variable is present (as suggested in the above PR). Any opinions on which approach is preferred?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 22 2025 at 14:39):

alexcrichton commented on issue #10639:

Thanks for the report! I think it'd be reasonable to make binaries deterministic-by-default so removing $OUT_DIR from the paths by default (rather than having it be opt-in). In any case though a PR would be much appreciated, we're happy to review!

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2025 at 15:02):

alexcrichton closed issue #10639:

Full paths in generate error messages are preventing us from producing deterministic build artifacts.

This is similar to https://github.com/bytecodealliance/wasmtime/issues/9553 and https://github.com/bytecodealliance/wasmtime/pull/9580. When generating term constructors here certain cases produce an unreachable! call which embeds the source code file path in the error message. When this is applied to the rules for emit_ret_gpr, emit_ret_xmm and defer_side_effect generated here, we end up with the full path (including OUT_DIR) of the generated files embedded in the resulting binary which makes builds non-deterministic.

I'm happy to put up a fix, either by trying to remove the OUT_DIR prefix or only including the path when a certain env variable is present (as suggested in the above PR). Any opinions on which approach is preferred?


Last updated: Dec 06 2025 at 07:03 UTC