Unverified Commit 54c30953 authored by Evgenii Stepanov's avatar Evgenii Stepanov Committed by GitHub
Browse files

Do not initialize the allocator on free(nullptr). (#74366)

free(nullptr) is guaranteed by ISO and POSIX to be a no-op, we should not pay for the overhead of maybeInit() in this case.

Additionally, Bionic calls free(nullptr) before the allocator settings are finalized.
Scudo should not run allocator initialization at that time. Doing so
causes various bad things to happen, like mapping primary regions with
the wrong PROT_MTE setting.
parent e77bfaaf
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment