diff --git a/centipede/BUILD b/centipede/BUILD index a77ea9bdc..4fbd803d4 100644 --- a/centipede/BUILD +++ b/centipede/BUILD @@ -213,6 +213,7 @@ cc_library( ":feature", ":logging", "@com_google_absl//absl/base:core_headers", + "@com_google_absl//absl/log:check", "@com_google_absl//absl/strings", "@com_google_absl//absl/strings:str_format", "@com_google_absl//absl/synchronization", diff --git a/centipede/util.cc b/centipede/util.cc index a81286d8a..46d0405db 100644 --- a/centipede/util.cc +++ b/centipede/util.cc @@ -24,6 +24,7 @@ #include #include #include +#include #include #include // NOLINT(popen) #include @@ -31,7 +32,11 @@ #include #include // NOLINT #include +#include +#include #include +#include +#include #include #include #include // NOLINT(build/c++11) @@ -41,6 +46,7 @@ #include "absl/base/attributes.h" #include "absl/base/const_init.h" #include "absl/base/thread_annotations.h" +#include "absl/log/check.h" #include "absl/strings/ascii.h" #include "absl/strings/str_format.h" #include "absl/strings/str_replace.h" @@ -85,7 +91,8 @@ void ReadFromLocalFile(std::string_view file_path, Container &data) { CHECK_EQ(size % sizeof(data[0]), 0); data.resize(size / sizeof(data[0])); f.read(reinterpret_cast(data.data()), size); - CHECK(f) << "Failed to read from local file: " << file_path; + CHECK(f) << "Failed to read from local file: " << VV(file_path) << VV(f.eof()) + << VV(f.bad()) << VV(f.fail()) << VV(size); f.close(); }