Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bootstrap: make snapshot reproducible #50983

Closed
wants to merge 3 commits into from

Commits on Jun 13, 2024

  1. src: return non-empty data in context data serializer

    For pointer values in the context data, we need to return
    non-empty data in the serializer so that V8 does not
    serialize them verbatim, making the snapshot unreproducible.
    joyeecheung committed Jun 13, 2024
    Configuration menu
    Copy the full SHA
    e3b6716 View commit details
    Browse the repository at this point in the history
  2. src: make sure that memcpy-ed structs in snapshot have no padding

    To make the snapshots reproducible, this patch updates the size
    of a few types and adds some static assertions to ensure that
    there are no padding in the memcpy-ed structs.
    joyeecheung committed Jun 13, 2024
    Configuration menu
    Copy the full SHA
    31b78b1 View commit details
    Browse the repository at this point in the history
  3. src: add utilities to help debugging reproducibility of snapshots

    - Print offsets in blob serializer
    - Add a special node:generate_default_snapshot ID to generate
      the built-in snapshot.
    - Improve logging
    - Add a test to check the reproducibilty of the snapshot
    joyeecheung committed Jun 13, 2024
    Configuration menu
    Copy the full SHA
    b71c4f8 View commit details
    Browse the repository at this point in the history