From aa240fbd480651bd72b3cebe7b5ea1cda204b7e9 Mon Sep 17 00:00:00 2001 From: Lancelot Six Date: Mon, 11 Sep 2023 14:54:59 +0000 Subject: [PATCH] gdb/testsuite/rocm: fix rocm-multi-inferior-gpu.cpp The gdb/testsuite/gdb.rocm/multi-inferior-gpu.cpp testcase contains a call to execl which does not have NULL as a last argument. This is an invalid use of execl. This patch fixes this oversight. Change-Id: I03b60abe30468d71ba5089b240c6d00f9b8883b2 Approved-By: Tom Tromey --- gdb/testsuite/gdb.rocm/multi-inferior-gpu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.rocm/multi-inferior-gpu.cpp b/gdb/testsuite/gdb.rocm/multi-inferior-gpu.cpp index ca869233b58..d64afdd1994 100644 --- a/gdb/testsuite/gdb.rocm/multi-inferior-gpu.cpp +++ b/gdb/testsuite/gdb.rocm/multi-inferior-gpu.cpp @@ -62,7 +62,7 @@ parent (int argc, char **argv) if (pid == 0) { /* Exec to force the child to re-initialize the ROCm runtime. */ - if (execl (argv[0], argv[0], n) == -1) + if (execl (argv[0], argv[0], n, nullptr) == -1) { perror ("Failed to exec"); return -1; -- 2.30.2