We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c778bd commit 32603fdCopy full SHA for 32603fd
1 file changed
src/unix/fs.c
@@ -482,7 +482,10 @@ static ssize_t uv__preadv_or_pwritev(int fd,
482
atomic_store_explicit(cache, (uintptr_t) p, memory_order_relaxed);
483
}
484
485
- f = p;
+ /* Use memcpy instead of `f = p` to work around a compiler bug,
486
+ * see https://github.com/libuv/libuv/issues/4532
487
+ */
488
+ memcpy(&f, &p, sizeof(p));
489
return f(fd, bufs, nbufs, off);
490
491
0 commit comments