Skip to content

Commit 3cf61a2

Browse files
authored
Properly throw in case of numeric overflow in Calendar mathematics (#900)
* Properly `throw` in case of numeric overflow in Calendar mathematics We have applied multiple different strategies with regard to overflow during calendrical calculation, including capping input `Date` and clipping Julian day calculation with artificial bounds. Those are still insufficient as there are too many paths where numeric overflow may happen. This patch patches those places by `throw`ing whenever applicable. Also adds fuzzing tests to cover many more Calendar API. Resolves rdar://133558250 * Review feedback: Adopt typed throw and fix an oversight * Update tests
1 parent 53ffff0 commit 3cf61a2

File tree

4 files changed

+293
-182
lines changed

4 files changed

+293
-182
lines changed

0 commit comments

Comments
 (0)