This is an archive of the discontinued LLVM Phabricator instance.

[scudo/standalone] Fix leak in ThreadedGlobalQuarantine test
ClosedPublic

Authored by mcgrathr on Nov 13 2020, 6:28 PM.

Details

Summary

This unit test code was using malloc without a corresponding free.
When the system malloc is not being overridden by the code under
test, it might an asan/lsan allocator that notices leaks.

Diff Detail

Event Timeline

mcgrathr created this revision.Nov 13 2020, 6:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 13 2020, 6:28 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
mcgrathr requested review of this revision.Nov 13 2020, 6:28 PM
phosek accepted this revision.Nov 13 2020, 7:43 PM

LGTM

compiler-rt/lib/scudo/standalone/tests/quarantine_test.cpp
253

Nit: no { and }.

This revision is now accepted and ready to land.Nov 13 2020, 7:43 PM
mcgrathr updated this revision to Diff 305299.Nov 13 2020, 10:23 PM
mcgrathr marked an inline comment as done.

style nit

compiler-rt/lib/scudo/standalone/tests/quarantine_test.cpp
253

Done.

This revision was landed with ongoing or failed builds.Nov 13 2020, 10:24 PM
This revision was automatically updated to reflect the committed changes.