• K
    Fixed issues Valgrind found. · 3c3df740
    Kosie van der Merwe 提交于
    Summary:
    Found issues with `db_test` and `db_stress` when running valgrind.
    
    `DBImpl` had an issue where if an compaction failed then it will use the uninitialised file size of an output file is used. This manifested as the final call to output to the log in `DoCompactionWork()` branching on uninitialized memory (all the way down in printf's innards).
    
    Test Plan:
    Ran `valgrind --track_origins=yes ./db_test` and `valgrind ./db_stress` to see if issues disappeared.
    
    Ran `make check` to see if there were no regressions.
    
    Reviewers: vamsi, dhruba
    
    Reviewed By: dhruba
    
    CC: leveldb
    
    Differential Revision: https://reviews.facebook.net/D8001
    3c3df740
db_stress.cc 27.7 KB