From 132b9eca80b36e9368dc806d8144d0846de2298c Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sun, 26 Nov 2023 18:22:01 +0100 Subject: [PATCH] launcher-linux.c (find_client): barf if we don't have read permission for executable For such an executable valgrind will now report: valgrind: Cannot continue: Need read permission on /usr/local/bin/exec-no-read https://bugs.kde.org/show_bug.cgi?id=281059 --- NEWS | 1 + coregrind/launcher-linux.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/NEWS b/NEWS index 223d7233cb..714f9acc5b 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,7 @@ than mailing the developers (or mailing lists) directly -- bugs that are not entered into bugzilla tend to get forgotten about or ignored. +281059 Cannot connect to Oracle using valgrind 390269 unhandled amd64-darwin syscall: unix:464 (openat_nocancel) 401284 False positive "Source and destination overlap in strncat" 428364 Signals inside io_uring_enter not handled diff --git a/coregrind/launcher-linux.c b/coregrind/launcher-linux.c index bc95e3c115..715fdab818 100644 --- a/coregrind/launcher-linux.c +++ b/coregrind/launcher-linux.c @@ -129,6 +129,8 @@ static char *find_client(const char *clientname) if (access(fullname, R_OK|X_OK) == 0) return fullname; + else if (access(fullname, X_OK) == 0) + barf("Need read permission on %s", fullname); } free(fullname); -- 2.47.2