• Nirbhay Choubey's avatar
    Bug#11756764 48726: MYSQLD KEEPS CRASHING WITH SIGSEGV · c9761d08
    Nirbhay Choubey authored
                        WITH MYISAM_USE_MMAP ENABLED
    
    MySQL server can crash due to segmentation fault when
    started with myisam_use_mmap.
    
    The reason behind this being, while making a request to
    unmap (munmap) the previously mapped memory (mmap), the
    size passed was 7 bytes larger than the size requested at
    the time of mapping. This can eventually unmap the adjacent
    memory mapped block, belonging to some other memory-map pool.
    Hence the subsequent call to mmap can map a region which was
    still a valid memory mapped area.
    
    Fixed by removing the extra 7-byte margin which was erroneously
    added to the size, used for unmappping.
    c9761d08
mi_packrec.c 50.2 KB