Skip to content

Commit

Permalink
pw_tokenizer: Use uint64_t for calculation
Browse files Browse the repository at this point in the history
Some compilers treat the intermediate calculation as multiplication
and addition overflow when UBSanitizer is enabled because the
arithmetic logic is using uint32_t as containers that get overflow with
the multiplication and addition.
Since the token is compile time evaluated, using uint64_t as containers
won't make any differences but can safely pet the compilers.

Change-Id: I4efb95f4eb361aab02dcda37002ebe52380e91b2
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/232851
Presubmit-Verified: CQ Bot Account <[email protected]>
Reviewed-by: Aaron Silman <[email protected]>
Lint: Lint 🤖 <[email protected]>
Reviewed-by: Wyatt Hepler <[email protected]>
Commit-Queue: Hungyen Weng <[email protected]>
  • Loading branch information
hungyenweng authored and CQ Bot Account committed Sep 3, 2024
1 parent f85d4f6 commit f438978
Show file tree
Hide file tree
Showing 5 changed files with 566 additions and 566 deletions.
Loading

0 comments on commit f438978

Please sign in to comment.