]> git.ipfire.org Git - thirdparty/glibc.git/commit
malloc: Improve free checks
authorWilco Dijkstra <wilco.dijkstra@arm.com>
Mon, 31 Mar 2025 11:44:02 +0000 (11:44 +0000)
committerWilco Dijkstra <wilco.dijkstra@arm.com>
Tue, 15 Apr 2025 11:14:57 +0000 (11:14 +0000)
commit9b0c8ced9c71a86f68d3e29693979dad6da3b79d
tree3a6a89e4af60a4792e61ee2161bcc1df9b319eb1
parent0296654d61ffa095fc7729f1efafa7d0e4fa4f7a
malloc: Improve free checks

The checks on size can be merged and use __builtin_add_overflow.  Since
tcache only handles small sizes (and rejects sizes < MINSIZE), delay this
check until after tcache.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
malloc/malloc.c