diff options
author | Jeffrey Czyz <jkczyz@gmail.com> | 2019-11-16 10:40:16 -0800 |
---|---|---|
committer | Jeffrey Czyz <jkczyz@gmail.com> | 2019-11-16 10:43:37 -0800 |
commit | 30fb598737f6efb7802d707a1fa989872e7f8b7b (patch) | |
tree | 8e63489b927987f04afcb3a55d4862ee008a3083 /src/support/lockedpool.cpp | |
parent | 15c84f53f47bf6e6a9c4c9dfe50c78d98f7ec07f (diff) |
Fix segfault in allocator_tests/arena_tests
The test uses reinterpret_cast<void*> on unallocated memory. Using this
memory in printchunk as char* causes a segfault, so have printchunk take
void* instead.
Diffstat (limited to 'src/support/lockedpool.cpp')
-rw-r--r-- | src/support/lockedpool.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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 << |