public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/maskray/grte] Don't crash if /var/tmp doesn't exist
@ 2021-08-28  0:30 Fangrui Song
  0 siblings, 0 replies; 4+ messages in thread
From: Fangrui Song @ 2021-08-28  0:30 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e8133ece37086f2a39fd76d776bed8319ce16e7e

commit e8133ece37086f2a39fd76d776bed8319ce16e7e
Author: Shu-Chun Weng <scw@google.com>
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;


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [glibc/maskray/grte] Don't crash if /var/tmp doesn't exist
@ 2021-08-28  0:34 Fangrui Song
  0 siblings, 0 replies; 4+ messages in thread
From: Fangrui Song @ 2021-08-28  0:34 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8238afcd89abe20989becb1a3836291a0f8b67dd

commit 8238afcd89abe20989becb1a3836291a0f8b67dd
Author: Shu-Chun Weng <scw@google.com>
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;


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [glibc/maskray/grte] Don't crash if /var/tmp doesn't exist
@ 2021-08-27 23:49 Fangrui Song
  0 siblings, 0 replies; 4+ messages in thread
From: Fangrui Song @ 2021-08-27 23:49 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=59da4ef70a8593607905571485244515d4b3a973

commit 59da4ef70a8593607905571485244515d4b3a973
Author: Shu-Chun Weng <scw@google.com>
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;


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [glibc/maskray/grte] Don't crash if /var/tmp doesn't exist
@ 2021-08-27 23:47 Fangrui Song
  0 siblings, 0 replies; 4+ messages in thread
From: Fangrui Song @ 2021-08-27 23:47 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=18d4a991ee13560b532e83d5d82f92fdc9068e72

commit 18d4a991ee13560b532e83d5d82f92fdc9068e72
Author: Shu-Chun Weng <scw@google.com>
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;


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-28  0:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-28  0:30 [glibc/maskray/grte] Don't crash if /var/tmp doesn't exist Fangrui Song
  -- strict thread matches above, loose matches on Subject: below --
2021-08-28  0:34 Fangrui Song
2021-08-27 23:49 Fangrui Song
2021-08-27 23:47 Fangrui Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).