strace: Handle variable-width timestamps
authorBarret Rhoden <brho@cs.berkeley.edu>
Mon, 20 Mar 2017 22:19:10 +0000 (18:19 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 21 Mar 2017 18:29:06 +0000 (14:29 -0400)
commitd88263dc86a37918cc86b014353a3cf4c6c8e3c2
tree441f2e5e5651ca2c42a5062499563f36908a60a2
parente70a87194b6758be8ea0458ed06a3f5ac4865a94
strace: Handle variable-width timestamps

If a machine has an uptime of over 10 million seconds (about 4 months),
then the timestamp field grows.  Strace couldn't handle this, since it
assumed the field was 40 bytes.

Incidentally, the machine wasn't up for 120 days, but it might have not
been turned off in that long.  Sometimes (often?) soft reboots don't reset
the TSC, which is where that timestamp comes from.  This occurence is the
same reason I found the bug from commit fd20de73987b ("Fixes TCP drops due
to ARP timeouts").

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
tests/strace.c