Serious bug in arenas_extend_ctl
jasone at canonware.com
Thu Nov 29 22:15:54 PST 2012
On Nov 26, 2012, at 3:15 AM, Mike Hommey <mh+jemalloc at glandium.org> wrote:
> On Mon, Nov 26, 2012 at 12:09:01PM +0100, Mike Hommey wrote:
>> Version 3.2 fails to build on windows, which thankfully made me spot
>> this horrible bug in ctl.c:
>> 1502 READ(ctl_stats.narenas - 1, unsigned);
>> This expands to:
>> (...) memcpy(oldp, (void *)&ctl_stats.narenas - 1, copylen); (...)
>> Which obviously doesn't do the right thing on other platforms.
> This small patch would avoid such mistakes to go unnoticed:
Fixed; thanks for the bug report.
More information about the jemalloc-discuss