From 30fb598737f6efb7802d707a1fa989872e7f8b7b Mon Sep 17 00:00:00 2001 From: Jeffrey Czyz Date: Sat, 16 Nov 2019 10:40:16 -0800 Subject: Fix segfault in allocator_tests/arena_tests The test uses reinterpret_cast on unallocated memory. Using this memory in printchunk as char* causes a segfault, so have printchunk take void* instead. --- src/support/lockedpool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/support') diff --git a/src/support/lockedpool.cpp b/src/support/lockedpool.cpp index a9541a9cac..85e3351e72 100644 --- a/src/support/lockedpool.cpp +++ b/src/support/lockedpool.cpp @@ -141,7 +141,7 @@ Arena::Stats Arena::stats() const } #ifdef ARENA_DEBUG -static void printchunk(char* base, size_t sz, bool used) { +static void printchunk(void* base, size_t sz, bool used) { std::cout << "0x" << std::hex << std::setw(16) << std::setfill('0') << base << " 0x" << std::hex << std::setw(16) << std::setfill('0') << sz << -- cgit v1.2.3