On Sun, Dec 01, 2013 at 09:41:55PM +0100, Thomas Rast wrote:

> When allocating the slab, the code accidentally computed the array
> size from s->slab (an elemtype**).  The slab is an array of elemtype*,
> however, so we should take the size of *s->slab.

Looks obviously correct.

> I browsed around for a while, and couldn't find out whether any
> architecture actually has any hope of running git (i.e. is at least
> mostly POSIX conformant) but still violates the assumption that all
> pointers[*] are the same size.
> The comp.lang.c FAQ has some interesting examples of wildly different
> pointer representations at:
>   http://c-faq.com/null/machexamp.html

Note that most of those examples are not different sizes, but rather
different null-pointer representations. We are already grossly out of
compliance with the standard there, as we typically use memset() to
zero-out structs with pointers.

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to