aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeffrey Czyz <[email protected]>2019-11-16 10:40:16 -0800
committerJeffrey Czyz <[email protected]>2019-11-16 10:43:37 -0800
commit30fb598737f6efb7802d707a1fa989872e7f8b7b (patch)
tree8e63489b927987f04afcb3a55d4862ee008a3083 /src
parentDefine ARENA_DEBUG in Travis test runs (diff)
downloaddiscoin-30fb598737f6efb7802d707a1fa989872e7f8b7b.tar.xz
discoin-30fb598737f6efb7802d707a1fa989872e7f8b7b.zip
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')
-rw-r--r--src/support/lockedpool.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/support/lockedpool.cpp b/src/support/lockedpool.cpp
index a9541a9ca..85e3351e7 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 <<