[Lldb-commits] [PATCH] D80150: [lldb/DataFormatter] Check for overflow when finding NSDate epoch
Vedant Kumar via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri May 22 18:14:32 PDT 2020
vsk updated this revision to Diff 265829.
vsk added a comment.
Apologies for all the breakage. I think I've identified the issues in the
initial patch which caused breakage on the bots, and which caused the tests to
not target what they meant to test.
I've reworked this patch to use std::llrint, instead of casting the max
`time_t` value to `double` as part of an overflow check. The cast to `double`
was not precise, and could crash on some machines (presumably due to a floating
For the tests, I've added asserts to make sure that the specially-crafted
values that are meant to trigger clamping behavior in std::llrint, or an
overflow in `llvm::checkedAdd`, actually do satisfy those conditions.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 11479 bytes
Desc: not available
More information about the lldb-commits