]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: activity/memprofile: always return "other" bin on NULL return address
authorWilly Tarreau <w@1wt.eu>
Tue, 15 Oct 2024 06:09:09 +0000 (08:09 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 15 Oct 2024 06:12:34 +0000 (08:12 +0200)
commit5091f90479ab4d963b55cb725cee8201d93521d9
tree5cc58ba6df9f82e50854b379c03f2b4f95edd8ad
parent93c9f19af7b3f8bf669460d7c0b0237f669a56a4
MINOR: activity/memprofile: always return "other" bin on NULL return address

It was found in a large "show profiling memory" output that a few entries
have a NULL return address, which causes confusion because this address
will be reused by the next new allocation caller, possibly resulting in
inconsistencies such as "free() ... pool=trash" which makes no sense. The
cause is in fact that the first caller had an entry->info pointing to the
trash pool from a p_alloc/p_free with a NULL return address, and the second
had a different type and reused that entry.

Let's make sure undecodable stacks causing an apparent NULL return address
all lead to the "other" bin.

While this is not exactly a bug, it would make sense to backport it to the
recent branches where the feature is used (probably at least as far as 2.8).
src/activity.c