Skip to content

Commit 30fb598

Browse files
committed
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.
1 parent 15c84f5 commit 30fb598

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/support/lockedpool.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ Arena::Stats Arena::stats() const
141141
}
142142

143143
#ifdef ARENA_DEBUG
144-
static void printchunk(char* base, size_t sz, bool used) {
144+
static void printchunk(void* base, size_t sz, bool used) {
145145
std::cout <<
146146
"0x" << std::hex << std::setw(16) << std::setfill('0') << base <<
147147
" 0x" << std::hex << std::setw(16) << std::setfill('0') << sz <<

0 commit comments

Comments
 (0)