[lsan] Rename IgnoreObjectLocked into IgnoreObject
We don't lock allocator for this call.
This commit is contained in:
parent
7d32866869
commit
39c0602414
@ -1144,7 +1144,7 @@ void ForEachChunk(ForEachChunkCallback callback, void *arg) {
|
||||
__asan::get_allocator().ForEachChunk(callback, arg);
|
||||
}
|
||||
|
||||
IgnoreObjectResult IgnoreObjectLocked(const void *p) {
|
||||
IgnoreObjectResult IgnoreObject(const void *p) {
|
||||
uptr addr = reinterpret_cast<uptr>(p);
|
||||
__asan::AsanChunk *m = __asan::instance.GetAsanChunkByAddr(addr);
|
||||
if (!m ||
|
||||
|
@ -618,11 +618,10 @@ void ForEachChunk(ForEachChunkCallback callback, void *arg) {
|
||||
__hwasan::allocator.ForEachChunk(callback, arg);
|
||||
}
|
||||
|
||||
IgnoreObjectResult IgnoreObjectLocked(const void *p) {
|
||||
IgnoreObjectResult IgnoreObject(const void *p) {
|
||||
p = __hwasan::InTaggableRegion(reinterpret_cast<uptr>(p)) ? UntagPtr(p) : p;
|
||||
uptr addr = reinterpret_cast<uptr>(p);
|
||||
uptr chunk =
|
||||
reinterpret_cast<uptr>(__hwasan::allocator.GetBlockBegin(p));
|
||||
uptr chunk = reinterpret_cast<uptr>(__hwasan::allocator.GetBlockBegin(p));
|
||||
if (!chunk)
|
||||
return kIgnoreObjectInvalid;
|
||||
__hwasan::Metadata *metadata = reinterpret_cast<__hwasan::Metadata *>(
|
||||
|
@ -324,7 +324,7 @@ void ForEachChunk(ForEachChunkCallback callback, void *arg) {
|
||||
allocator.ForEachChunk(callback, arg);
|
||||
}
|
||||
|
||||
IgnoreObjectResult IgnoreObjectLocked(const void *p) {
|
||||
IgnoreObjectResult IgnoreObject(const void *p) {
|
||||
void *chunk = allocator.GetBlockBegin(p);
|
||||
if (!chunk || p < chunk) return kIgnoreObjectInvalid;
|
||||
ChunkMetadata *m = Metadata(chunk);
|
||||
|
@ -997,7 +997,7 @@ void __lsan_ignore_object(const void *p) {
|
||||
// Cannot use PointsIntoChunk or LsanMetadata here, since the allocator is not
|
||||
// locked.
|
||||
Lock l(&global_mutex);
|
||||
IgnoreObjectResult res = IgnoreObjectLocked(p);
|
||||
IgnoreObjectResult res = IgnoreObject(p);
|
||||
if (res == kIgnoreObjectInvalid)
|
||||
VReport(1, "__lsan_ignore_object(): no heap object found at %p\n", p);
|
||||
if (res == kIgnoreObjectAlreadyIgnored)
|
||||
|
@ -154,7 +154,7 @@ class LsanMetadata {
|
||||
void ForEachChunk(ForEachChunkCallback callback, void *arg);
|
||||
|
||||
// Helper for __lsan_ignore_object().
|
||||
IgnoreObjectResult IgnoreObjectLocked(const void *p);
|
||||
IgnoreObjectResult IgnoreObject(const void *p);
|
||||
|
||||
// The rest of the LSan interface which is implemented by library.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user