[sanitizer] Print errno for report file open failure
authorTeresa Johnson <tejohnson@google.com>
Sun, 25 Oct 2020 05:32:03 +0000 (22:32 -0700)
committerTeresa Johnson <tejohnson@google.com>
Thu, 29 Oct 2020 15:47:30 +0000 (08:47 -0700)
commit81f7b96ed0a2295e0b82ca185019370ac8e1895e
treebb92d25d4b78f22cb5271a56e7234f818335f394
parentabf31f278cb629d8bc7f1683b7bfceb8d3f011c2
[sanitizer] Print errno for report file open failure

To help debug failures, specifically the llvm-avr-linux bot failure from
5c20d7db9f2791367b9311130eb44afecb16829c:

http://lab.llvm.org:8011/#/builders/112/builds/407/steps/5/logs/FAIL__MemProfiler-x86_64-linux-dynamic__log_path_t

Also re-enable the failing test which I temporarily disabled, to
see if this change will help identify why that particular log file can't
be opened for write on that bot (when another log file in the same
directory could earlier in the test).

Differential Revision: https://reviews.llvm.org/D90120
compiler-rt/lib/sanitizer_common/sanitizer_file.cpp
compiler-rt/test/memprof/TestCases/log_path_test.cpp