/memcheck/tests/freebsd/452275
/memcheck/tests/freebsd/access
/memcheck/tests/freebsd/bug464476
+/memcheck/tests/freebsd/bug470713
/memcheck/tests/freebsd/capsicum
/memcheck/tests/freebsd/chflags
/memcheck/tests/freebsd/chmod_chown
469146 massif --ignore-fn does not ignore inlined functions
469768 Make it possible to install gdb scripts in a different location
470520 Multiple realloc zero errors crash in MC_(eq_Error)
+470713 Failure on the Yosys project: valgrind: m_libcfile.c:1802
+ (Bool vgPlain_realpath(const HChar *, HChar *)): Assertion 'resolved' failed
To see details of a given bug, visit
https://bugs.kde.org/show_bug.cgi?id=XXXXXX
{
const HChar *exe_name = VG_(resolved_exename);
+ if (!len) {
+ return False;
+ }
+
+ if (!out) {
+ HChar tmp[VKI_PATH_MAX];
+ if (!VG_(realpath)(exe_name, tmp)) {
+ return False;
+ }
+ *len = VG_(strlen)(tmp)+1;
+ return True;
+ }
+
if (!VG_(realpath)(exe_name, out)) {
return False;
}
bug464476_rel_symlink.stderr.exp \
bug464476_rel_symlink.stdout.exp \
memalign.vgtest memalign.stderr.exp
+ bug470713.vgtest bug470713.stderr.exp \
+ bug470713.stdout.exp
check_PROGRAMS = \
statfs pdfork_pdkill getfsstat inlinfo inlinfo_nested.so extattr \
linkat scalar_fork scalar_thr_exit scalar_abort2 scalar_pdfork \
scalar_vfork stat file_locking_wait6 utimens access chmod_chown \
misc get_set_context utimes static_allocs fexecve errno_aligned_allocs \
- setproctitle sctp sctp2 bug464476 memalign
+ setproctitle sctp sctp2 bug464476 memalign bug470713
AM_CFLAGS += $(AM_FLAG_M3264_PRI)
AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)
inlinfo_nested_so_LDFLAGS = -Wl,-rpath,$(top_builddir)/memcheck/tests/freebsd -shared -fPIC
bug464476_SOURCES = bug464476.cpp
+bug470713_SOURCES = bug470713.cpp
if FREEBSD_VERS_13_PLUS
check_PROGRAMS += realpathat scalar_13_plus eventfd1 eventfd2
--- /dev/null
+// roughly based on the code for Firefox class BinaryPath
+// https://searchfox.org/mozilla-central/source/xpcom/build/BinaryPath.h#185
+
+#include <iostream>
+#include <sys/types.h>
+#include <sys/sysctl.h>
+#include <limits.h>
+#include <string>
+#include <memory>
+
+using std::cerr;
+using std::cout;
+using std::string;
+
+int main(int argc, char **argv)
+{
+ int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1};
+ size_t len;
+
+ if (sysctl(mib, 4, NULL, &len, NULL, 0) != 0) {
+ cout << "sysctl failed to get path length: " << strerror(errno) << '\n';
+ return -1;
+ }
+
+ std::unique_ptr<char[]> aResult(new char[len]);
+
+ if (sysctl(mib, 4, aResult.get(), &len, NULL, 0) != 0) {
+ cout << "sysctl failed to get path: " << strerror(errno) << '\n';
+ return -1;
+ }
+
+ if (string(aResult.get()) == argv[1]) {
+ cout << "OK\n";
+ } else {
+ cout << "Not OK aResult " << aResult << " argv[1] " << argv[1] << '\n';
+ }
+
+ if (sysctl(mib, 4, NULL, NULL, NULL, 0) != -1) {
+ cout << "OK syscall failed\n";
+ return -1;
+ } else {
+ cout << "sysctl succeeded when it should have failed\n";
+ }
+}
--- /dev/null
+OK
+OK syscall failed
--- /dev/null
+prog: bug470713
+vgopts: -q
+args: `pwd`/bug470713