Refs: nodejs/node#33549
if (-1 === mkstemp(req->path)) {
// req->path can contain garbage now
}
POSIX allows (but doesn't mandate) the input/output buffer to get clobbered on error, and AIX indeed does so.
To flush out portability bugs in downstream users, make libuv always clobber the buffer on error.
Alternatively, preserve req->path by operating on a copy, but that needs dynamic memory allocation and incurs the (probably minor) performance hit of two memcpys.
Refs: nodejs/node#33549
POSIX allows (but doesn't mandate) the input/output buffer to get clobbered on error, and AIX indeed does so.
To flush out portability bugs in downstream users, make libuv always clobber the buffer on error.
Alternatively, preserve
req->pathby operating on a copy, but that needs dynamic memory allocation and incurs the (probably minor) performance hit of two memcpys.