464476 Firefox fails to start under Valgrind
464859 Build failures with GCC-13 (drd tsan_unittest)
464969 D language demangling
+465435 m_libcfile.c:66 (vgPlain_safe_fd): Assertion 'newfd >= VG_(fd_hard_limit)' failed.
To see details of a given bug, visit
https://bugs.kde.org/show_bug.cgi?id=XXXXXX
vg_assert(VG_(fd_hard_limit) != -1);
newfd = VG_(fcntl)(oldfd, VKI_F_DUPFD, VG_(fd_hard_limit));
- if (newfd != -1)
- VG_(close)(oldfd);
+
+ if (newfd == -1) {
+ VG_(debugLog)(0, "libcfile", "Valgrind: FATAL: "
+ "Private file creation failed.\n"
+ " The current file descriptor limit is %d.\n"
+ " If you are running in Docker please consider\n"
+ " lowering this limit with the shell built-in limit command.\n",
+ VG_(fd_hard_limit));
+ VG_(debugLog)(0, "libcfile", "Exiting now.\n");
+ VG_(exit)(1);
+ }
+
+ vg_assert(newfd >= VG_(fd_hard_limit));
+
+ VG_(close)(oldfd);
/* Set the close-on-exec flag for this fd. */
VG_(fcntl)(newfd, VKI_F_SETFD, VKI_FD_CLOEXEC);
- vg_assert(newfd >= VG_(fd_hard_limit));
return newfd;
}
# else
# error "Unknown OS"
# endif
- return sr_isError(res) ? -1 : sr_Res(res);
+ if (sr_isError(res)) {
+ VG_(debugLog)(1, "VG_(fcntl)", "fcntl error %lu %s\n", sr_Err(res), VG_(strerror)(sr_Err(res)));
+ return -1;
+ }
+ return (Int)sr_Res(res);
}
Int VG_(rename) ( const HChar* old_name, const HChar* new_name )