calling a function via PLT and jemalloc realloc changes function first argument (XMM0)

Jason Evans jasone at
Tue Nov 26 11:50:19 PST 2013

On Nov 26, 2013, at 4:23 AM, Ingvar Hagelund <ingvar at> wrote:
> David Abdurachmanov wrote:
>> I am having problems with jemalloc 3.4.1 (currently we use 2.2.2 in production). I found that with jemalloc 3.4.1 function first argument will be changed if first argument is passed by XMM0 register. Compiled with GCC 4.8.1 (tested also with 4.8.2). No problems on Scientific Linux 6 (RHEL6-based), but it fails on Scientific Linux 5 (RHEL5-based). All of this is because _dl_lookup_symbol_x calls _realloc_ in Scientific Linux 5.
>> This probably makes jemalloc 3.4.1 and the whole 3.X.Y series not recommended for RHEL5 and RHEL5-based distributions.
>> (...)
> Just a note from the EPEL* maintainer. EPEL6 has jemalloc-3.4.x. EPEL5 has stayed on 3.1.x for a while, and unless there are serious bugs that should be fixed, I don't plan to update it.
> Ingvar
> *) EPEL is the Fedora "Extra packages for Enterprise Linux" project, that is, repackaged Fedora RPMS for Red Hat Enterprise Linux and clones like CentOS and Scientific Linux.

FWIW, I'm planning to provide a workaround for the floating point corruption issue in 3.5.0:

There have been numerous bug fixes since 3.1.0, but the following are the only ones that are likely to cause trouble for an application that doesn't use any non-standard features:

	Fix deadlock related to chunk_record().

	Fix another deadlock related to chunk_record().

I hope 3.5.x series will be a compelling stable update, as my primary focus right now is on testing.


More information about the jemalloc-discuss mailing list