[Gluster-devel] crypt xlator bug
Jeff Darcy
jdarcy at redhat.com
Thu Apr 2 02:08:39 UTC 2015
> > I found one issue that local is not allocated using GF_CALLOC and with a
> > mem-type.
> > This is a patch which *might* fix it.
>
> It does. The memory corruption disapeared and the test can complete.
Interesting. I suspect this means that we *are* in the case where the
previous comment came from. Mem_get can allocate objects two ways:
* As one of many objects in a slab, tracking internally.
* As a singleton, directly via GF_*ALLOC.
In mem_put, we do some pretty nasty pointer arithmetic to figure out
which way an object was allocated. If we get it wrong, and therefore
use the wrong *de*allocate method (either way I believe) then we'll
corrupt memory. The symptoms so far suggest that an object was
allocated within a slab, then deallocated as a singleton (causing its
memory to be poisoned). That sucks.
More information about the Gluster-devel
mailing list