This is an archive of the discontinued LLVM Phabricator instance.

[HWASAN] Implmented LSAN specifc thread support.
ClosedPublic

Authored by kstoimenov on Jan 6 2023, 9:48 AM.

Details

Summary

Implemented LSAN interface on HwasanThreadList and added os_id to __hwasan::Thread.

Diff Detail

Event Timeline

kstoimenov created this revision.Jan 6 2023, 9:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 6 2023, 9:48 AM
Herald added a subscriber: Enna1. · View Herald Transcript
kstoimenov requested review of this revision.Jan 6 2023, 9:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 6 2023, 9:48 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
kstoimenov edited the summary of this revision. (Show Details)Jan 6 2023, 10:01 AM
kstoimenov added reviewers: vitalybuka, thurston.
vitalybuka accepted this revision.Jan 9 2023, 3:20 PM
vitalybuka added inline comments.
compiler-rt/lib/hwasan/hwasan_thread.cpp
12

why do you need sanitizer_thread_registry?

This revision is now accepted and ready to land.Jan 9 2023, 3:20 PM
kstoimenov updated this revision to Diff 487606.Jan 9 2023, 4:57 PM

Removed include.

kstoimenov added inline comments.Jan 9 2023, 4:58 PM
compiler-rt/lib/hwasan/hwasan_thread.cpp
12

It was from my previous attempts to make it work with it. Nice catch. Removed.

vitalybuka requested changes to this revision.Jan 9 2023, 5:55 PM
vitalybuka added inline comments.
compiler-rt/lib/hwasan/hwasan_thread_list.h
221

why do we need another mutex?

This revision now requires changes to proceed.Jan 9 2023, 5:55 PM
vitalybuka added inline comments.Jan 9 2023, 5:57 PM
compiler-rt/lib/hwasan/hwasan_thread_list.h
206

In a separate patch, can you put thread-safety annotations for all fields?

After rebase.

vitalybuka accepted this revision.Jan 10 2023, 3:56 PM
vitalybuka added inline comments.
compiler-rt/lib/hwasan/hwasan_thread_list.h
187

I guess we care about live_list_mutex_

This revision is now accepted and ready to land.Jan 10 2023, 3:56 PM

After rebase.

This revision was landed with ongoing or failed builds.Jan 10 2023, 4:14 PM
This revision was automatically updated to reflect the committed changes.