- Dec 06, 2013
-
-
Jason Evans authored
Unless heap profiling is enabled, disable floating point code and don't link with libm. This, in combination with e.g. EXTRA_CFLAGS=-mno-sse on x64 systems, makes it possible to completely disable floating point register use. Some versions of glibc neglect to save/restore caller-saved floating point registers during dynamic lazy symbol loading, and the symbol loading code uses whatever malloc the application happens to have linked/loaded with, the result being potential floating point register corruption.
-
Jason Evans authored
-
Jason Evans authored
-
- Dec 05, 2013
-
-
Jason Evans authored
Submitted by Mike Hommey.
-
- Dec 04, 2013
-
-
Jason Evans authored
Reported by Michael Truog.
-
Jason Evans authored
Refactor the test harness to support three types of tests: - unit: White box unit tests. These tests have full access to all internal jemalloc library symbols. Though in actuality all symbols are prefixed by jet_, macro-based name mangling abstracts this away from test code. - integration: Black box integration tests. These tests link with the installable shared jemalloc library, and with the exception of some utility code and configure-generated macro definitions, they have no access to jemalloc internals. - stress: Black box stress tests. These tests link with the installable shared jemalloc library, as well as with an internal allocator with symbols prefixed by jet_ (same as for unit tests) that can be used to allocate data structures that are internal to the test code. Move existing tests into test/{unit,integration}/ as appropriate. Split out internal parts of jemalloc_defs.h.in and put them in jemalloc_internal_defs.h.in. This reduces internals exposure to applications that #include <jemalloc/jemalloc.h>. Refactor jemalloc.h header generation so that a single header file results, and the prototypes can be used to generate jet_ prototypes for tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in, jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and use a shell script to generate a unified jemalloc.h at configure time. Change the default private namespace prefix from "" to "je_". Add missing private namespace mangling. Remove hard-coded private_namespace.h. Instead generate it and private_unnamespace.h from private_symbols.txt. Use similar logic for public symbols, which aids in name mangling for jet_ symbols. Add test_warn() and test_fail(). Replace existing exit(1) calls with test_fail() calls.
-
Jason Evans authored
Avoid referencing sbrk(2) on OS X, because it is deprecated as of OS X 10.9 (Mavericks), and the compiler warns against using it.
-
- Dec 03, 2013
-
-
Jason Evans authored
-
- Nov 30, 2013
-
-
Jason Evans authored
Clean up malloc_ncpus() by replacing incorrectly indented if..else branches with a ?: expression. Submitted by Igor Podlesny.
-
- Nov 26, 2013
-
-
Jason Evans authored
Fix rallocm() to use the specified arena for allocation, not just deallocation. Clarify ALLOCM_ARENA(a) documentation.
-
- Nov 20, 2013
-
-
Jason Evans authored
Fix malloc_tsd_dalloc() to bypass tcache when dallocating, so that there is no danger of causing tcache reincarnation during thread exit. Whether this infinite loop occurs depends on the pthreads TSD implementation; it is known to occur on Solaris. Submitted by Markus Eberspächer.
-
- Oct 30, 2013
-
-
Jason Evans authored
Add ids for all mallctl entries, so that external documents can link to arbitrary mallctl entries.
-
Jason Evans authored
-
- Oct 28, 2013
-
-
Jason Evans authored
-
Jason Evans authored
-
- Oct 25, 2013
-
-
Leonard Crestez authored
When using LinuxThreads pthread_setspecific triggers recursive allocation on all threads. Work around this by creating a global linked list of in-progress tsd initializations. This modifies the _tsd_get_wrapper macro-generated function. When it has to initialize an TSD object it will push the item to the linked list first. If this causes a recursive allocation then the _get_wrapper request is satisfied from the list. When pthread_setspecific returns the item is removed from the list. This effectively adds a very poor substitute for real TLS used only during pthread_setspecific allocation recursion. Signed-off-by: Crestez Dan Leonard <lcrestez@ixiacom.com>
-
Leonard Crestez authored
This function causes recursive allocation on LinuxThreads. Signed-off-by: Crestez Dan Leonard <lcrestez@ixiacom.com>
-
- Oct 22, 2013
-
-
Jason Evans authored
Reported by Pat Lynch.
-
Jason Evans authored
Add a missing mutex unlock in a malloc_init_hard() error path (failed mutex initialization). In practice this bug was very unlikely to ever trigger, but if it did, application deadlock would likely result. Reported by Pat Lynch.
-
Jason Evans authored
Avoid (min < 0) comparison for unsigned min in malloc_conf_init(). This bug had no practical consequences. Reported by Pat Lynch.
-
Jason Evans authored
Reported by Pat Lynch.
-
- Oct 21, 2013
-
-
Jason Evans authored
Consistently use malloc_mutex_prefork() instead of malloc_mutex_lock() in all prefork functions.
-
Jason Evans authored
-
Jason Evans authored
-
Jason Evans authored
-
Jason Evans authored
-
Jason Evans authored
Fix a compiler warning in chunk_record() that was due to reading node rather than xnode. In practice this did not cause any correctness issue, but dataflow analysis in some compilers cannot tell that node and xnode are always equal in cases that the read is reached.
-
- Oct 20, 2013
-
-
Jason Evans authored
Fix a race condition in the "arenas.extend" mallctl that could lead to internal data structure corruption. The race could be hit if one thread called the "arenas.extend" mallctl while another thread concurrently triggered initialization of one of the lazily created arenas.
-
Jason Evans authored
-
Jason Evans authored
Fix dangerous casts of int variables to pointers in thread join function calls. On LP64 systems, int and pointers are different sizes, so writes can corrupt memory.
-
Jason Evans authored
Fix a Valgrind integration flaw that caused Valgrind warnings about reads of uninitialized memory in internal zero-initialized data structures (relevant to tcache and prof code).
-
Jason Evans authored
-
Jason Evans authored
Fix a Valgrind integration flaw that caused Valgrind warnings about reads of uninitialized memory in arena chunk headers.
-
Jason Evans authored
Add the JEMALLOC_ALWAYS_INLINE_C macro and use it for always-inlined functions declared in .c files. This fixes a function attribute inconsistency for debug builds that resulted in (harmless) compiler warnings about functions not being inlinable. Reported by Ricardo Nabinger Sanchez.
-
Jason Evans authored
Reported by Ricardo Nabinger Sanchez.
-
- Oct 14, 2013
-
-
Alexandre Perrin authored
-
- Oct 03, 2013
-
-
Jason Evans authored
-
- Aug 20, 2013
-
-
Jason Evans authored
Introduce AROUT to control whether there is space between ARFLAGS and $@. This regression was introduced by ad505e0e. Reported by Mike Hommey.
-
- Aug 19, 2013
-
-
Jory A. Pratt authored
-
- Jun 03, 2013
-
-
Jason Evans authored
-