| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix an OOM-related regression in arena_tcache_fill_small() that caused
cache corruption that would almost certainly expose the application to
undefined behavior, usually in the form of an allocation request
returning an already-allocated region, or somewhat less likely, a freed
region that had already been returned to the arena, thus making it
available to the arena for any purpose.
This regression was introduced by
9c43c13a35220c10d97a886616899189daceb359 (Reverse tcache fill order.),
and was present in all releases from 2.2.0 through 3.6.0.
This resolves #98.
|
|
|
|
|
|
|
| |
Fix the cactive statistic to decrease (rather than increase) when active
memory decreases. This regression was introduced by
aa5113b1fdafd1129c22512837c6c3d66c295fc8 (Refactor overly large/complex
functions) and first released in 3.5.0.
|
|\ |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Remove autoconf code that explicitly disabled libgcc-based backtracing
on i[3456]86. There is no mention of which platforms/compilers
exhibited problems when this code was added, and chances are good that
any gcc toolchain issues have long since been fixed.
|
| |
| |
| |
| |
| |
| | |
Specify -fno-omit-frame-pointer when using __builtin_frame_address() and
__builtin_return_address() for backtracing. This fixes backtracing
failures on e.g. i686 for optimized builds.
|
| |
| |
| |
| |
| | |
Add cpp logic to enable big-endian mode in SFMT. This should fix SFMT
tests on e.g. MIPS and SPARC.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The hash code, which has MurmurHash3 at its core, generates different
output depending on system endianness, so adapt the expected output on
big-endian systems. MurmurHash3 code also makes the assumption that
unaligned access is okay (not true on all systems), but jemalloc only
hashes data structures that have sufficient alignment to dodge this
limitation.
|
| |
| |
| |
| |
| |
| |
| | |
Reduce maximum tested alignment from 2^29 to 2^25. Some systems may not
have enough contiguous virtual memory to satisfy the larger alignment,
but the smaller alignment is still adequate to test multi-chunk
alignment.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
p_test_fail() was passing a va_list to two separate functions with the
expectation that no reset would occur. Refactor p_test_fail()'s callers
to instead format two strings and pass them to p_test_fail().
Add a missing parameter to an assert_u64_eq() call, which the compiler
warned about after the assertion macro refactoring.
|
| |\
| | |
| | | |
FreeBSD memory (leak) profiling support
|
| | |
| | |
| | |
| | |
| | |
| | | |
Fixes a situation where nm uses the debug lib but
addr2line does not, which completely messes up the symbol
lookup.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Fixes a situation where nm uses the debug lib but
addr2line does not, which completely messes up the symbol
lookup.
|
| | |
| | |
| | |
| | |
| | | |
* Assumes procfs is mounted at /proc, cf.
<http://www.freebsd.org/doc/en/articles/linux-users/procfs.html>
|
| |\ \
| | | |
| | | | |
Use arena dss prec instead of default for huge allocs.
|
| | |/
| | |
| | |
| | |
| | | |
Pass a dss_prec_t parameter to huge_{m,p,r}alloc instead of defaulting
to the chunk dss prec.
|
| | | |
|
| |\ \
| | |/
| |/| |
Fix a crashing case where arena_chunk_init_hard returns NULL.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This happens when it fails to allocate a new chunk. Which
arena_chunk_alloc then passes into arena_avail_insert without any
checks. This then causes a crash when arena_avail_insert tries
to check chunk->ndirty.
This was introduced by the refactoring of arena_chunk_alloc
which previously would have returned NULL immediately after
calling chunk_alloc. This is now the return from
arena_chunk_init_hard so we need to check that return, and
not continue if it was NULL.
|
|/
|
|
| |
Reported by İsmail Dönmez.
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Restore the essence of 898960247a8b2e6534738b7a3a244855f379faf9, which
sabotages tail call optimization. This is necessary even when the
mutually recursive functions are in separate compilation units.
|
| |
| |
| |
| |
| |
| |
| | |
If mremap(2) is used for huge reallocation, physical pages are mapped to
new virtual addresses rather than data being copied to new pages. This
bypasses the normal junk filling that would happen during allocation, so
add junk filling that is specific to this case.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make sure that emmintrin.h can be #include'd without causing a
compilation error, rather than blindly defining HAVE_SSE2 based on
architecture. Attempts to force SSE2 compilation on a 32-bit Ubuntu
13.10 system running as a VMware guest resulted in a no-win choice
without any obvious explanation besides toolchain misconfiguration/bug:
- Suffer compilation failure due to __MMX__, __SSE__, and __SSE2__ not
being defined, even if -mmmx, -msse, and -msse2 are manually
specified (note that they appear to be enabled by default).
- Manually define __MMX__, __SSE__, and __SSE2__, and suffer compiler
warnings that they are already automatically defined. This results in
successful compilation and execution, but the noise is intolerable.
|
| |
| |
| |
| |
| |
| | |
Break prof_accum into multiple compilation units, in order to thwart
compiler optimizations such as inlining and tail call optimization that
would alter backtraces.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a cpp #define that removes 'restrict' keyword usage unless the
compiler definitely supports C99. As written, 'restrict' is only
enabled if the compiler supports the -std=gnu99 option (e.g. gcc and
llvm).
Reported by Tobias Hieta.
|
| |\
| | |
| | | |
Fix typo
|
| |/ |
|
| |\
| | |
| | | |
Using MADV_FREE on Solaris/Illumos
|
| |/ |
|
| |
| |
| |
| |
| | |
Inlining of alloc_0() and alloc_1() would prevent generation of unique
backtraces, upon which the test code relies.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Remove the allocm() test equivalent to the mallocx() test removed in the
previous commit. The flawed test attempted to cause OOM due to large
request size and alignment constraint. Although this test "passed" on
64-bit systems due to the virtual memory hole, it could pass on some
32-bit systems.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Avoid copying "jeprof" to a 1-byte buffer within prof_boot0() when heap
profiling is disabled. Although this is dead code under such
conditions, the compiler doesn't figure that part out.
Reported by Eduardo Silva.
|
| |
| |
| |
| |
| |
| |
| | |
Fix/remove three related flawed tests that attempted to cause OOM due to
large request size and alignment constraint. Although these tests
"passed" on 64-bit systems due to the virtual memory hole, they could
pass on some 32-bit systems.
|
| |
| |
| |
| | |
Reported by İsmail Dönmez.
|
|/ |
|
|\ |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Re-structure alloc_[01](), which are mutually tail-recursive functions,
to do (unnecessary) work post-recursion so that the compiler cannot
perform tail call optimization, thus preserving intentionally unique
call paths in captured backtraces.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Fix a regression in prof_dump_ctx() due to an uninitized variable. This
was caused by revision 4f37ef693e3d5903ce07dc0b61c0da320b35e3d9, so no
releases are affected.
|