diff --git a/deps/uv/src/unix/fs.c b/deps/uv/src/unix/fs.c
index 4a4e2e3ad85..2fa80733293 100644
--- a/deps/uv/src/unix/fs.c
+++ b/deps/uv/src/unix/fs.c
@@ -477,13 +477,17 @@ static ssize_t uv__preadv_or_pwritev(int fd,
p = dlsym(RTLD_DEFAULT, is_pread ? "preadv" : "pwritev");
dlerror(); /* Clear errors. */
#endif /* RTLD_DEFAULT */
+ fprintf(stderr, "p: %p\n", p);
if (p == NULL)
p = is_pread ? uv__preadv_emul : uv__pwritev_emul;
atomic_store_explicit(cache, (uintptr_t) p, memory_order_relaxed);
}
f = p;
- return f(fd, bufs, nbufs, off);
+ ssize_t r = f(fd, bufs, nbufs, off);
+ fprintf(stderr, "fd: %d. r: %d\n", fd, r);
+ return r;
+ //return f(fd, bufs, nbufs, off);
}
It looks like a compiler optimization going wrong but I don't know what to look at next. Any ideas? /cc @bnoordhuis
This is a strange issue. When running on the Node.js armv7 build bots, the preadv tests are failing. In fact
preadvreturnsEINVALeven though the arguments are correct. I was adding some debug statements to theuv__preadv_or_pwritev()method when suddenly with this specific modifications it started working. At the moment I cannot add more info as I cannot runstracenor a debugger in that specific environmentIt looks like a compiler optimization going wrong but I don't know what to look at next. Any ideas? /cc @bnoordhuis