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. Zcash: Includes change from bitcoin/bitcoin#13163
This commit is contained in:
parent
28825123eb
commit
4277ef2063
|
@ -145,7 +145,7 @@ Arena::Stats Arena::stats() const
|
|||
}
|
||||
|
||||
#ifdef ARENA_DEBUG
|
||||
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 <<
|
||||
|
|
Loading…
Reference in New Issue