Skip flatbuffer verification in some cases - #730
Merged
Merged
Conversation
There was a problem hiding this comment.
Rust Benchmark
Details
| Benchmark suite | Current: eb8bb64 | Previous: 1c0740d | Ratio |
|---|---|---|---|
rule-match-browserlike/brave-list |
1913704476 ns/iter (± 7176275) |
1924967612 ns/iter (± 7805929) |
0.99 |
rule-match-first-request/brave-list |
1366356 ns/iter (± 17578) |
1345618 ns/iter (± 43788) |
1.02 |
blocker_new/brave-list |
111387021 ns/iter (± 251095) |
111587961 ns/iter (± 336549) |
1.00 |
blocker_new/brave-list-deserialize |
1987937 ns/iter (± 7625) |
31531323 ns/iter (± 2045870) |
0.06304641895298843 |
memory-usage-final/brave-list-initial |
9671732 B/iter (± 0) |
9671732 B/iter (± 0) |
1 |
memory-usage-final/brave-list-1000-requests |
3215263 B/iter (± 0) |
3215263 B/iter (± 0) |
1 |
memory-usage-max/brave-list-initial/max |
32237425 B/iter (± 0) |
32237425 B/iter (± 0) |
1 |
memory-usage-alloc-count/brave-list-initial/alloc-count |
287123 allocs/iter (± 0) |
287123 allocs/iter (± 0) |
1 |
memory-usage-alloc-count/brave-list-1000-requests/alloc-count |
81427 allocs/iter (± 0) |
81427 allocs/iter (± 0) |
1 |
url_cosmetic_resources/brave-list |
185646 ns/iter (± 2284) |
187013 ns/iter (± 766) |
0.99 |
cosmetic-class-id-match/brave-list |
3263172 ns/iter (± 892942) |
3336389 ns/iter (± 836749) |
0.98 |
This comment was automatically generated by workflow using github-action-benchmark.
antonok-edm
reviewed
Sep 25, 2026
Comment on lines
264
to
268
| let expected_hash: u64 = if cfg!(feature = "css-validation") { | ||
| 4595639195770030762 | ||
| 17765782844446154098 | ||
| } else { | ||
| 12609292311627976202 | ||
| 7585209289575817889 | ||
| }; |
Collaborator
There was a problem hiding this comment.
it would be good to have a way to override the crate versions used in these expected_hash tests. As it stands they will now need to be updated for every new version bump.
Collaborator
Author
There was a problem hiding this comment.
I've updated these tests to verify hash without the header.
Now we don't need to update the values when we do a bump.
antonok-edm
approved these changes
Sep 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces #728
The idea is to provide ability to skip flatbuffer verification for the browser startup when we load/create a DAT file with the same version the engine version + DAT seahash matches.
It technically allows to create a memory corruption for attacker with a write access, but it's out of the Chromium threat model:
link