leveldb/helpers/memenv
cmumford ce399ac28a Always copy bytes to scratch buffer when reading w/MemEnv.
FileState::Read (used by InMemoryEnv) creates a new Slice when reading.
If all the bytes for the read are in the first block then the Slice
points to the private block data in FileState and is not copied to the
|scratch| buffer.

A recent change allows files in InMemEnv to be overwritten which deletes
these blocks and in this case can result in a Slice having a dangling
pointer. This change fixes this bug by always copying to the |scratch|
buffer.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=239301930
2019-03-20 13:56:39 -07:00
..
memenv_test.cc Make InMemoryEnv more consistent with filesystem based Env's. 2019-03-11 13:41:25 -07:00
memenv.cc Always copy bytes to scratch buffer when reading w/MemEnv. 2019-03-20 13:56:39 -07:00
memenv.h Add CMake build support. 2018-03-16 19:17:27 -07:00