mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-28 13:02:38 +02:00
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.
This commit is contained in:
parent
15c84f53f4
commit
30fb598737
@ -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 <<
|
||||
|
Loading…
Reference in New Issue
Block a user