--- old/src/share/vm/compiler/compileLog.cpp 2014-11-24 10:08:10.819740005 +0100 +++ new/src/share/vm/compiler/compileLog.cpp 2014-11-24 10:08:10.739740008 +0100 @@ -56,8 +56,10 @@ } CompileLog::~CompileLog() { - delete _out; + delete _out; // Close fd in fileStream::~fileStream() _out = NULL; + // Remove partial file after merging in CompileLog::finish_log_on_error + unlink(_file); FREE_C_HEAP_ARRAY(char, _identities, mtCompiler); FREE_C_HEAP_ARRAY(char, _file, mtCompiler); } @@ -278,10 +280,9 @@ } file->print_raw_cr(""); close(partial_fd); - unlink(partial_file); } CompileLog* next_log = log->_next; - delete log; + delete log; // Removes partial file log = next_log; } _first = NULL;