From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7814) id 440AF3857800; Sat, 28 Aug 2021 00:38:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 440AF3857800 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Fangrui Song To: glibc-cvs@sourceware.org Subject: [glibc/google/grte/v5-2.27/master] Don't crash if /var/tmp doesn't exist X-Act-Checkin: glibc X-Git-Author: Shu-Chun Weng X-Git-Refname: refs/heads/google/grte/v5-2.27/master X-Git-Oldrev: df64d523104d05a17c9ef66345077154588a5424 X-Git-Newrev: 8238afcd89abe20989becb1a3836291a0f8b67dd Message-Id: <20210828003859.440AF3857800@sourceware.org> Date: Sat, 28 Aug 2021 00:38:59 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Aug 2021 00:38:59 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8238afcd89abe20989becb1a3836291a0f8b67dd commit 8238afcd89abe20989becb1a3836291a0f8b67dd Author: Shu-Chun Weng Date: Mon May 3 16:47:10 2021 -0700 Don't crash if /var/tmp doesn't exist `xstat` is checked `stat64` crashing the program if the latter returns failure. In this loop, we are trying to find one folder that satisfies the condition, no reason to crash the program if one folder doesn't. Diff: --- io/tst-copy_file_range.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/io/tst-copy_file_range.c b/io/tst-copy_file_range.c index 3d531a1937..38763328d3 100644 --- a/io/tst-copy_file_range.c +++ b/io/tst-copy_file_range.c @@ -759,8 +759,7 @@ do_test (void) } struct stat64 cstat; - xstat (path, &cstat); - if (cstat.st_dev == instat.st_dev) + if (stat (path, &cstat) != 0 || cstat.st_dev == instat.st_dev) { free (to_free); continue;