This is an archive of the discontinued LLVM Phabricator instance.

[GWP-ASan] Allow late initialisation if single-threaded.
ClosedPublic

Authored by hctim on Feb 3 2020, 8:08 AM.

Details

Summary

This patch allows for late initialisation of the GWP-ASan allocator. Previously, if late initialisation occurred, the sample counter was never updated, meaning we would end up having to wait for 2^32 allocations before getting a sampled allocation.

Now, we initialise the sampling mechanism in init() as well. We require init() to be called single-threaded, so this isn't a problem.

Diff Detail

Event Timeline

hctim created this revision.Feb 3 2020, 8:08 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 3 2020, 8:08 AM
Herald added subscribers: llvm-commits, Restricted Project, mgorny. · View Herald Transcript

Unit tests: fail. 62352 tests passed, 1 failed and 839 were skipped.

failed: libc++.std/containers/sequences/array/array_creation/to_array.fail.cpp

clang-tidy: fail. clang-tidy found 2 errors and 1 warnings. 0 of them are added as review comments below (why?).

clang-format: pass.

Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.

eugenis accepted this revision.Feb 3 2020, 11:24 AM

LGTM

This revision is now accepted and ready to land.Feb 3 2020, 11:24 AM
This revision was automatically updated to reflect the committed changes.