make futexWaitUntil tolerant of invalid time_point-s
Summary:
futexWaitUntil could generate an invalid timespec when presented
with a time_point from before the epoch, which resulted in an EINVAL from
the futex syscall. Debug builds crashed on this unexpected return value,
while release builds soldiered on. This path happened to be exercised
by the unit test. This diff fixes the unintentional deadline overflow
in the test, adds explicit testing of overflow behavior, and makes
futexWaitUntil handle invalid time_points in a sensible manner.
Test Plan:
1. new unit tests
2. fbmake runtests_dbg
Reviewed By: mssarang@fb.com
Subscribers: strager, njormrod, folly-diffs@
FB internal diff:
D1747972
Tasks:
5853949
Signature: t1:
1747972:
1419382193:
862c193a13428d96acb33c85f962f59203661f40