fix(e2e): build argon2 WASM without SIMD; bump Playwright to 1.59.1#1
Open
cooper667 wants to merge 2 commits into
Open
fix(e2e): build argon2 WASM without SIMD; bump Playwright to 1.59.1#1cooper667 wants to merge 2 commits into
cooper667 wants to merge 2 commits into
Conversation
Playwright 1.59.x ships webkit-2272 whose JIT mis-handles SIMD WASM on linux/amd64: given identical inputs, our argon2 WASM returns garbage, non-deterministic output. Reproduced locally under linux/amd64 and confirmed via: a) CI failure in previous renovate PR; b) libsodium (no SIMD ops) passes on the same browser binary; c) rebuilding this package from src/ref.c (scalar) instead of src/opt.c (SSE2/AVX2 intrinsics compiled to v128) makes the test pass. Trade-off: drops the SIMD perf optimization. A future change can restore SIMD (either after upstream webkit fix, or by shipping dual WASM with runtime feature detection). Changes: - build.sh: drop -msimd128 -mavx2 -D__AVX2__; use src/ref.c - @playwright/test: 1.58.2 -> 1.59.1 - playwright docker image + run-playwright action: bumped to match
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tests whether CI passes with a non-SIMD WASM build under Playwright 1.59.1.
Context
Renovate PR phi-ag#704 bumping
@playwright/testto 1.59.1 broke the webkit e2e test with non-deterministic argon2 output (same password + salt → different hash each run). The renovate PR CI failure:https://github.com/phi-ag/argon2/actions/runs/24701187889/job/72244551769?pr=704
Investigation
Reproduced locally on linux/amd64 with Rosetta disabled:
-msimd128 -mavx2,src/opt.c) → garbage, non-deterministicsrc/ref.c(scalar) → deterministic, correctConclusion: the webkit-2272 JIT on amd64 mis-codegens the v128 instructions emitted when compiling
opt.cs SSE2/AVX2 intrinsics. Libsodiums WASM sidesteps it (no SIMD ops in this build). The bug is in the browser, but the workaround here is to stop emitting the trigger instructions.Changes
build.sh: drop-msimd128 -mavx2 -D__AVX2__; compilesrc/ref.cinstead ofsrc/opt.c.@playwright/test: 1.58.2 → 1.59.1.run-playwrightaction pinned to match.Trade-off
Loses the SIMD perf optimization. Future options:
Not included
Upstream bug reports (Playwright / WebKit) — worth filing separately with the reproducer described above.