mirror of
https://github.com/gperftools/gperftools
synced 2025-02-26 17:10:24 +00:00
generic_writer_test: crash with message if tmpfile fails
This commit is contained in:
parent
7756b4cc61
commit
e7f576d9f1
@ -39,6 +39,10 @@ void PrintLargeAmount(GenericWriter* writer) {
|
||||
void TestFile() {
|
||||
#ifndef _WIN32
|
||||
FILE* f = tmpfile();
|
||||
if (!f) {
|
||||
perror("tmpfile");
|
||||
abort();
|
||||
}
|
||||
|
||||
{
|
||||
tcmalloc::RawFDGenericWriter<128> writer(static_cast<RawFD>(fileno(f)));
|
||||
|
Loading…
Reference in New Issue
Block a user