Skip to content

Commit 9295568

Browse files
jkczyzfurszy
authored andcommitted
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 f7d88f5 commit 9295568

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/support/lockedpool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Arena::Stats Arena::stats() const
145145
}
146146

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

0 commit comments

Comments
 (0)