-
Notifications
You must be signed in to change notification settings - Fork 713
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unnecessary checks before releasing resources
Summary: Continuation from the exploration of heap usage under `storage/rocksdb`. Essence of these changes: - Remove the code we don't need. Less code, less problems, better comprehension and readability. - Where appropriate set the released pointers to `nullptr` to make sure that all the "use after delete/free" type of bugs will manifest ASAP. Depending on OS, allocators used, what particular deallocator //really// does under the hood, the memory location may contain valid data for indeterminate amount of time and we won't be able to catch invalid usage till it's too late. Why change this? Because there are better things in life than sleeping in your office for three days and trying to trace down that heap corruption which blocks shipping the product, causes random `SIGSEGV`-s, and happens once per week on a specific configuration when you happen to wear a certain brand of trail running shoes :-) Test Plan: `mysqlbuild.sh mysqltest.sh --testset=RocksDB mysqlbuild.sh --release mysqltest.sh --release --testset=RocksDB` Reviewers: yoshinorim, jtolmer Reviewed By: jtolmer Subscribers: jkedgar, webscalesql-eng Differential Revision: https://reviews.facebook.net/D53439
- Loading branch information
Gunnar Kudrjavets
committed
Jan 29, 2016
1 parent
6a0765d
commit 1c7af80
Showing
3 changed files
with
32 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters