mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-23 21:29:49 +00:00
Fixed incorrect thread arena output ##debug
When issuing dmha, often times the output would include thousands of lines saying the thread arena is 0xffffffffffffff. This commit introduces a simple check of GHT_MAX that aborts printing if the thread arena is equal to that number. I assume those pointers are incorrect anyway.
This commit is contained in:
parent
6c28822d73
commit
f81c7dee37
@ -1413,6 +1413,14 @@ void GH(print_malloc_states)( RCore *core, GHT m_arena, MallocState *main_arena)
|
||||
while (GH(is_arena) (core, m_arena, ta->GH(next)) && ta->GH(next) != m_arena) {
|
||||
PRINT_YA ("thread arena @ ");
|
||||
PRINTF_BA ("0x%"PFMT64x, (ut64)ta->GH(next));
|
||||
// if the next pointer is equal to unsigned -1 we assume its invalid
|
||||
// and return. otherwise we get undefined behavior and weird output offten
|
||||
// times with thousands of lines in the output
|
||||
// saying thread arenas are at 0xffff... which is obviously incorrect
|
||||
// related to issue #20767
|
||||
if (ta->GH(next) == GHT_MAX) {
|
||||
break;
|
||||
}
|
||||
if (!GH(update_main_arena) (core, ta->GH(next), ta)) {
|
||||
free (ta);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user