Skip to content
Commit 4e3dac6f authored by Guillaume Chelfi's avatar Guillaume Chelfi Committed by Chia-hung Duan
Browse files

[scudo] Call __scudo_deallocate_hook on reallocations.

Scudo is expected to call __scudo_allocate_hook on allocations, and
__scudo_deallocate_hook on deallocations, but it's behavior is not
clear on reallocations. Currently, non-trivial reallocations call
__scudo_allocate_hook but never __scudo_deallocate_hook. We should
prefer either calling both, none, or a dedicated
hook (__scudo_reallocate_hook, for instance).

This patch implements the former, and adds a unit test to enforce
those expectations.

Reviewed By: Chia-hungDuan

Differential Revision: https://reviews.llvm.org/D141407
parent 6c7894a8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment