]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix memcheck/tests/linux/sys-copy_file_range open call (mode).
authorMark Wielaard <mark@klomp.org>
Fri, 24 May 2019 19:51:31 +0000 (21:51 +0200)
committerMark Wielaard <mark@klomp.org>
Fri, 24 May 2019 19:51:31 +0000 (21:51 +0200)
sys-copy_file_range.c calls open with O_CREAT flag and so must provide
a mode argument. valgrind memcheck actually caught this ommission on
some arches (fedora rawhide i686 specifically).

This is a small additional fixup for
https://bugs.kde.org/show_bug.cgi?id=407218

memcheck/tests/linux/sys-copy_file_range.c

index 589399c6bb040375775937b0061fb8e4493d9bee..3022fa1c5ce81482e9979784c18176c2d286c2cc 100644 (file)
@@ -12,7 +12,7 @@ int main(int argc, char **argv)
     struct stat stat;
     loff_t len, ret;
 
-    fd_in = open("copy_file_range_source", O_CREAT | O_RDWR);
+    fd_in = open("copy_file_range_source", O_CREAT | O_RDWR, 0644);
     if (fd_in == -1) {
         perror("open copy_file_range_source");
         exit(EXIT_FAILURE);