tensorpipe icon indicating copy to clipboard operation
tensorpipe copied to clipboard

strerror isn't thread-safe

Open lw opened this issue 3 years ago • 0 comments

The strerror function (which returns the human-readable message for an error number) isn't thread safe. In practice on Linux it only happens for invalid error numbers, because in that case strerror creates a dynamic error message (something like Unknown error N) in a process-wide buffer, hence different threads could race on it.

This is highly unlikely to pose a problem for us, but it's a nice-to-fix thing. This issue is to remember it.

lw avatar Sep 08 '20 11:09 lw