From: Frank Ch. Eigler Date: Tue, 9 Dec 2025 00:22:48 +0000 (-0500) Subject: snap X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6398d2e504c5487ce2d0b4d83fe992f3336ffd74;p=thirdparty%2Felfutils.git snap --- diff --git a/src/stackprof.cxx b/src/stackprof.cxx index 0805abeb..a13f88a4 100644 --- a/src/stackprof.cxx +++ b/src/stackprof.cxx @@ -294,7 +294,12 @@ main (int argc, char *argv[]) close (pipefd[1]); // close write end char dummy; int rc = read (pipefd[0], &dummy, 1); // block until parent is ready - assert (rc == 1); + if (rc != 1) + { + cerr << "ERROR: child sync read failed" + << ": " << strerror(errno) << endl; + exit(1); + } close (pipefd[0]); execvp (argv[remaining], & argv[remaining] /* not +1: child argv[0] included! */ ); // notreached unless error