• P
    Fix insecure internal API for GetImpl (#8590) · 1d34cd79
    Peter Dillinger 提交于
    Summary:
    Calling the GetImpl function could leave reference to a local
    callback function in a field of a parameter struct. As this is
    performance-critical code, I'm not going to attempt to sanitize this
    code too much, but make the existing hack a bit cleaner by reverting
    what it overwrites in the input struct.
    
    Added SaveAndRestore utility class to make that easier.
    
    Pull Request resolved: https://github.com/facebook/rocksdb/pull/8590
    
    Test Plan:
    added unit test for SaveAndRestore; existing tests for
    GetImpl
    
    Reviewed By: riversand963
    
    Differential Revision: D29947983
    
    Pulled By: pdillinger
    
    fbshipit-source-id: 2f608853f970bc06724e834cc84dcc4b8599ddeb
    1d34cd79
db_impl.cc 184.3 KB