Serious bug in arenas_extend_ctl

Mike Hommey mh+jemalloc at glandium.org
Mon Nov 26 03:09:01 PST 2012


Hi,

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.

Mike



More information about the jemalloc-discuss mailing list