tools: make code cache and snapshot deterministic #29142
tools: make code cache and snapshot deterministic #29142bnoordhuis wants to merge 3 commits intonodejs:masterfrom
Conversation
Use a fixed random seed to ensure that the generated sources are identical across runs. The final node binary still reseeds itself on start-up so there should be no security implications caused by predictable random numbers (e.g., `Math.random()`, ASLR, the hash seed, etc.) Fixes: nodejs#29108
| int main(int argc, char* argv[]) { | ||
| #endif // _WIN32 | ||
|
|
||
| v8::V8::SetFlagsFromString("--random_seed=42"); |
|
Hrm, looks like retrieval from the cache fails unless node is also started with I can work around that by resetting |
|
also @nodejs/v8 |
|
pummel/test-hash-seed: https://ci.nodejs.org/job/node-test-commit-custom-suites-freestyle/8546/ |
@bnoordhuis Would I be correct to conclude from the above comments that this shouldn't land yet? |
|
@Trott I incorporated the necessary fixes. bnoordhuis/io.js@ed2c673 is the fix but the timestamp may be throwing off GH because it shows up before my comment. |
|
Landed in 5116a6a |
Use a fixed random seed to ensure that the generated sources are identical across runs. The final node binary still reseeds itself on start-up so there should be no security implications caused by predictable random numbers (e.g., `Math.random()`, ASLR, the hash seed, etc.) Fixes: #29108 PR-URL: #29142 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Use a fixed random seed to ensure that the generated sources are identical across runs. The final node binary still reseeds itself on start-up so there should be no security implications caused by predictable random numbers (e.g., `Math.random()`, ASLR, the hash seed, etc.) Fixes: #29108 PR-URL: #29142 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
|
@bnoordhuis Yes, I can confirm that this fixes the issue. Thanks! |
Use a fixed random seed to ensure that the generated sources are
identical across runs.
The final node binary still reseeds itself on start-up so there should
be no security implications caused by predictable random numbers (e.g.,
Math.random(), ASLR, the hash seed, etc.)Fixes: #29108