Without this patch, e.g an object of CHUNK_SIZE is treated as non-large
in AO_malloc but freed by AO_free_large (incorrectly).
* src/atomic_ops_malloc.c (AO_malloc): Call AO_malloc_large() also for
size values in range CHUNK_SIZE-sizeof(AO_t)+1 .. CHUNK_SIZE.
AO_t *result;
unsigned log_sz;
- if (sz > CHUNK_SIZE)
+ if (sz > CHUNK_SIZE - sizeof(AO_t))
return AO_malloc_large(sz);
log_sz = msb(sz + (sizeof(AO_t) - 1));
result = AO_stack_pop(AO_free_list+log_sz);