More strict error handling may be required in `Monotonic`
hnes opened this issue · comments
Hi, I am not good at golang's asm, but the implementation logic probably seems not so strict in the monotime/mono_linux_amd64.s:
-
As the __vdso_clock_gettime_sym may not support CLOCK_MONOTONIC_RAW (
$ man clock_gettime
: since Linux 2.6.28; Linux-specific), so we should also check the ret status (EINVAL|EFAULT|EPERM). -
When vdso_is_sad is been executed, the monotime's ret is also invalid. But it seems that there does not have any checking codes in the go function
Monotonic
.
Thanks a lot.