1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-10 01:50:53 +09:00

[wasm] Automate patching the emsdk installation to add controlled indeterminism. (#75532)

This commit is contained in:
Zoltan Varga 2022-09-13 15:46:32 -04:00 committed by GitHub
parent 67d2570ccf
commit 2bc4f61536
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 47 additions and 7 deletions

View file

@ -83,14 +83,10 @@ and change the
This will hopefully cause the failure to happen reliably.
There is another random number generator in `upstream/emscripten/src/deterministic.js`
which needs the same treatment:
```
var randomBuffer3 = new Uint8Array(2);
crypto.getRandomValues(randomBuffer3);
which needs the same treatment.
var MAGIC = (randomBuffer3 [0] << 8) | randomBuffer3 [1];
console.log ("SEED2: " + MAGIC);
```
Running `make patch-deterministic` in `src/mono/wasm` will patch the
emscripten installation in `src/mono/wasm/emsdk` with these changes.
# Debugging signature mismatch errors