aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2015-04-22 23:31:39 -0700
committerChristopher Ferris <cferris@google.com>2015-04-22 23:31:39 -0700
commit165e51a7a9067485e7b54b14b571020d7d9bdfc5 (patch)
treedd1886e09f74adb3881dbcfc2d6d8c628a6f43ee /src
parent46799943028c7eaf859523c5caf33e7a66a527ea (diff)
downloadjemalloc-165e51a7a9067485e7b54b14b571020d7d9bdfc5.tar.gz
Temporary patch to avoid crashes.
Bug: 20296122 Change-Id: Ifabfa7a72f38b1781155624dc101464edb7a38be
Diffstat (limited to 'src')
-rw-r--r--src/arena.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/arena.c b/src/arena.c
index 6368e7c..9e7ecf7 100644
--- a/src/arena.c
+++ b/src/arena.c
@@ -2258,6 +2258,11 @@ arena_dalloc_small(arena_t *arena, arena_chunk_t *chunk, void *ptr,
{
arena_chunk_map_bits_t *bitselm;
+ /* Temporary workaround to avoid crashes. b/20296122. */
+ if (arena == NULL) {
+ return;
+ }
+ /* End of workaround. */
if (config_debug) {
/* arena_ptr_small_binind_get() does extra sanity checking. */
assert(arena_ptr_small_binind_get(ptr, arena_mapbits_get(chunk,