I suspect this isn't proper legal, because we make no function call here.
The value of errno in the initial thread is zero at program startup (the initial value of
errno in other threads is an indeterminate value), but is never set to zero by any library
function.202) The value of errno may be set to nonzero by a library function call
whether or not there is an error, provided the use of errno is not documented in the
description of the function in this International Standard.
I suspect this isn't proper legal, because we make no function call here.
affects tsan as well.