[PATCH] D54599: [Profile] Avoid race condition when dumping GCDA files.

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 15 14:01:39 PST 2018


vsk added a comment.

Could you share either a link to or the abbreviated text of the test failure?



================
Comment at: lib/profile/GCDAProfiling.c:361
       if (fd == -1) {
-        /* Bah! It's hopeless. */
-        int errnum = errno;
-        fprintf(stderr, "profiling: %s: cannot open: %s\n", filename,
-                strerror(errnum));
-        return;
+        fd = open(filename, O_RDWR | O_BINARY);
+        if (fd == -1) {
----------------
Why try to create the file again?


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D54599





More information about the llvm-commits mailing list