Skip to content

Commit

Permalink
v8, refactor: disable snapshot checksum verification to support loadi…
Browse files Browse the repository at this point in the history
…ng dumped code cache.
  • Loading branch information
xicilion committed Sep 27, 2024
1 parent f48ba38 commit 0baef0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion v8/patch/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,8 @@ bool OS::IsHardwareEnforcedShadowStacksEnabled() {
// #if defined(_MSC_VER) && !defined(__clang__)
#define V8_COMPILER_IS_MSVC
// #endif
```
```
#### src/snapshot/code-serializer.cc
```cpp
// return SerializedCodeSanityCheckResult::kReadOnlySnapshotChecksumMismatch;
```
2 changes: 1 addition & 1 deletion v8/src/snapshot/code-serializer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ SerializedCodeSanityCheckResult SerializedCodeData::SanityCheckWithoutSource(
uint32_t ro_snapshot_checksum =
GetHeaderValue(kReadOnlySnapshotChecksumOffset);
if (ro_snapshot_checksum != expected_ro_snapshot_checksum) {
return SerializedCodeSanityCheckResult::kReadOnlySnapshotChecksumMismatch;
// return SerializedCodeSanityCheckResult::kReadOnlySnapshotChecksumMismatch;
}
uint32_t payload_length = GetHeaderValue(kPayloadLengthOffset);
uint32_t max_payload_length = size_ - kHeaderSize;
Expand Down

0 comments on commit 0baef0c

Please sign in to comment.