cgrzemba / 389-ds-base

Forked from 389-ds-base 5 years ago
Clone

a6784c0 Ticket 48132 - modrdn crashes server (invalid read/writes)

Authored and Committed by mreynolds 9 years ago
    Ticket 48132 - modrdn crashes server (invalid read/writes)
    
    Bug Description:  When performing a modrdn stress test using two masters
                      a double free can occur that will lead to a crash.  When
                      the server is under load it might have to retry the modrdn
                      operation.  During this retry the SLAPI_MODRDN_EXISTING_ENTRY
                      entry was previosuly replaced, and it can be freed twice on
                      the second retry..
    
    Fix Description:  Check if entry being retuned form the cache is the same as
                      the entry stored in SLAPI_MODRDN_EXISTING_ENTRY, if it is,
                      set it to NULL so it is not freed again.
    
    https://fedorahosted.org/389/ticket/48132
    
    valgrind: PASSED
    
    Reviewed by: nhosoi(Thanks!)
    
    (cherry picked from commit 1d9ae0f4a1ea12463ac59a04da5e6572db002d73)