[Sanitizer] Teach ReadFileToBuffer to distinguish empty file from inaccessible file.
authorAlexey Samsonov <vonosmas@gmail.com>
Fri, 17 Jul 2015 23:50:08 +0000 (23:50 +0000)
committerAlexey Samsonov <vonosmas@gmail.com>
Fri, 17 Jul 2015 23:50:08 +0000 (23:50 +0000)
commite6c614d48a33a067b386d1a4a22bff5db982821e
tree19b742ad46eafc8ef613536dab8a2f059fc0c71d
parent2e309076f2569bba03931ad72e4f9b106bce3f38
[Sanitizer] Teach ReadFileToBuffer to distinguish empty file from inaccessible file.

Summary:
This fixes https://code.google.com/p/address-sanitizer/issues/detail?id=399
(sanitizers crash with empty suppression files).

Reviewers: kcc

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D11284

llvm-svn: 242594
compiler-rt/lib/sanitizer_common/sanitizer_common.cc
compiler-rt/lib/sanitizer_common/sanitizer_common.h
compiler-rt/lib/sanitizer_common/sanitizer_flags.cc
compiler-rt/lib/sanitizer_common/sanitizer_linux.cc
compiler-rt/lib/sanitizer_common/sanitizer_procmaps_common.cc
compiler-rt/lib/sanitizer_common/sanitizer_procmaps_linux.cc
compiler-rt/lib/sanitizer_common/sanitizer_suppressions.cc
compiler-rt/test/lsan/TestCases/suppressions_file.cc