The fuzzer found that a 100,000 digit number could possibly return an
incorrect result. This patch fixes the issue.
Details
Details
- Reviewers
sivachandra lntue - Commits
- rG548789b071a7: [libc] Fix HPD on extremely long numbers
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Adding tests is impractical. To trigger the bug a number would have to be more than 100,000 digits long. Given the rarity of numbers like that I'm willing to accept a small amount of risk of a regression.
Comment Actions
I was wrong. I've added tests. They don't test the behavior directly, but they're the best I can do without 100k of zeroes. Also I increased the maximum exponent HPD will store to 2^30, which is ~1 billion. If we discover this limit is too low I will be shocked.