mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04:00
DEBUG: pool: improve decoding of corrupted pools
When a corruption was detected in an object, it's often said that the tag doesn't match the pool, but it should also check if it matches the location of an earlier pool_free() call, which happens when -dMcaller is used. That's what we're doing now.
This commit is contained in:
parent
21447b1dd4
commit
b21aaef4e5
1 changed files with 9 additions and 2 deletions
11
src/pool.c
11
src/pool.c
|
|
@ -1016,9 +1016,16 @@ void pool_inspect_item(const char *msg, struct pool_head *pool, const void *item
|
|||
if (!the_pool) {
|
||||
const char *start, *end, *p;
|
||||
|
||||
pool_mark = (const void **)(((char *)item) + pool->size);
|
||||
chunk_appendf(&trash,
|
||||
"Tag does not match any other pool.\n"
|
||||
"Tag does not match any other pool.\n");
|
||||
|
||||
pool_mark = (const void **)(((char *)item) + pool->size);
|
||||
if (resolve_sym_name(&trash, "Resolving the tag as a pool_free() location: ", *pool_mark))
|
||||
chunk_appendf(&trash, "\n");
|
||||
else
|
||||
chunk_appendf(&trash, " (no match).\n");
|
||||
|
||||
chunk_appendf(&trash,
|
||||
"Contents around address %p+%lu=%p:\n",
|
||||
item, (ulong)((const void*)pool_mark - (const void*)item),
|
||||
pool_mark);
|
||||
|
|
|
|||
Loading…
Reference in a new issue