[PATCH] D32800: [msan] Fix getmntent{_r} for empty /etc/fstab

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 3 11:00:31 PDT 2017


eugenis added inline comments.


================
Comment at: lib/msan/tests/msan_test.cc:2213
+
+   void Create(void) {
+     snprintf(tmpfile, sizeof(tmpfile), "/tmp/msan.getmntent.tmp.XXXXXX");
----------------
Either make this a constructor, or call it from the constructor, or  add a check in the destructor so that it does not try to unlink an uninitialized path if Create was never called.

What happens if the test fails in one of the ASSERTs, will the file be unlinked? We build msan tests with -fno-exceptions.


https://reviews.llvm.org/D32800





More information about the llvm-commits mailing list