• unknown's avatar
    Bug#35616: memory overrun on 64-bit linux on setting large values for keybuffer-size · 55c336fd
    unknown authored
    We could allocate chunks larger than 4GB, but did our size-accounting in 32-bit
    values. This could lead to spurious warnings, inaccurate accounting, and, in
    theory, data loss.
    
    Affected: 64-bit platforms. Debug-build (with safemalloc). At least one buffer
    larger than 4GB. For potential data loss, a re-alloc on such a buffer would be
    necessary.
    
    
    mysys/my_static.c:
      Make memory-accounting 64-bit safe.
    mysys/my_static.h:
      Make memory-accounting 64-bit safe.
      Move in struct for better alignment when 64-bit.
    55c336fd
my_static.c 3.6 KB