This is an archive of the discontinued LLVM Phabricator instance.

[Asan] Fix __asan_update_allocation_context
ClosedPublic

Authored by vitalybuka on Sep 6 2020, 7:17 PM.

Details

Summary

Update both thread and stack.
Update thread and stack as atomic operation.
Keep all 32bit of TID as now we have enough bits.

Depends on D87135.

Diff Detail

Event Timeline

vitalybuka created this revision.Sep 6 2020, 7:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 6 2020, 7:17 PM
Herald added subscribers: Restricted Project, jfb. · View Herald Transcript
vitalybuka requested review of this revision.Sep 6 2020, 7:17 PM
morehouse added inline comments.Sep 9 2020, 4:47 PM
compiler-rt/lib/asan/asan_allocator.cpp
89–90

Nit: Since we're adding member functions and private members, let's change struct to class.

compiler-rt/test/asan/TestCases/asan_update_allocation.cpp
7

Looks like CHECK-%os is unused, let's remove it.

30

s/=/-

30

Why do we expect the threaded test to not give the allocation thread?

vitalybuka updated this revision to Diff 290857.Sep 9 2020, 6:18 PM
vitalybuka marked 4 inline comments as done.

update

vitalybuka added inline comments.Sep 9 2020, 6:20 PM
compiler-rt/test/asan/TestCases/asan_update_allocation.cpp
30

I tried to check that this is not main thread to avoid assuming thread numbering
Probably unnecessary.

This revision is now accepted and ready to land.Sep 10 2020, 8:16 AM
This revision was automatically updated to reflect the committed changes.