Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! fixup! bootstrap: check more metadata when loading the snapshot
  • Loading branch information
joyeecheung committed Aug 8, 2022
commit 6f4a5e70c1b62b2c813f30a78b52eccf248b072e
2 changes: 1 addition & 1 deletion src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1266,7 +1266,7 @@ int LoadSnapshotDataAndRun(const SnapshotData** snapshot_data_ptr,
// snapshot, but we will skip it if --no-node-snapshot is specified.
const node::SnapshotData* read_data =
SnapshotBuilder::GetEmbeddedSnapshotData();
if (read_data->Check()) {
if (read_data != nullptr && read_data->Check()) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed a bug for cross-compiled binaries.

// If we fail to read the embedded snapshot, treat it as if Node.js
// was built without one.
*snapshot_data_ptr = read_data;
Expand Down