From f7e87e6ae3497287ceac6ef266d4f10ee8ab3c53 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Thu, 4 Feb 2021 16:14:00 +0100 Subject: [PATCH] PR422261 platform selection fails for unqualified client name Bug introduced with commit f15beea76 "Fix memory leak in launcher-linux.c" Need to try opening the actual 'client' path, not just the 'clientname' file name. Reported-by: Michael Wojcik https://bugs.kde.org/show_bug.cgi?id=422261 --- NEWS | 1 + coregrind/launcher-linux.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index e196e8fec..2d0409157 100644 --- a/NEWS +++ b/NEWS @@ -63,6 +63,7 @@ n-i-bz helgrind: If hg_cli__realloc fails, return NULL. (actually affected all x86 and nanomips regardless of host bitness) 415293 Incorrect call-graph tracking due to new _dl_runtime_resolve_xsave* 422174 unhandled instruction bytes: 0x48 0xE9 (REX prefixed JMP instruction) +422261 platform selection fails for unqualified client name 422623 epoll_ctl warns for uninitialized padding on non-amd64 64bit arches 423021 PPC: Add missing ISA 3.0 documentation link and HWCAPS test. 424298 amd64: Implement RDSEED diff --git a/coregrind/launcher-linux.c b/coregrind/launcher-linux.c index 7a1224877..bc95e3c11 100644 --- a/coregrind/launcher-linux.c +++ b/coregrind/launcher-linux.c @@ -158,7 +158,7 @@ static const char *select_platform(const char *clientname) if (strcmp (client, clientname) != 0) VG_(debugLog)(2, "launcher", "selecting platform for '%s'\n", client); - if ((fd = open(clientname, O_RDONLY)) < 0) { + if ((fd = open(client, O_RDONLY)) < 0) { return_null: free (client); return NULL;