This is an archive of the discontinued LLVM Phabricator instance.

tsan: add missing guard for DumpProcessMap call
ClosedPublic

Authored by thanm on Jun 27 2022, 6:38 AM.

Details

Summary

Add a missing "#if !SANITIZER_GO" guard for a call to DumpProcessMap
in the Finalize hook (needed to build an updated Go race detector syso
image).

Diff Detail

Event Timeline

thanm created this revision.Jun 27 2022, 6:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 27 2022, 6:38 AM
Herald added a subscriber: Enna1. · View Herald Transcript
thanm requested review of this revision.Jun 27 2022, 6:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 27 2022, 6:38 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
thanm added a comment.Jun 27 2022, 6:42 AM

FYI, without this change, when I build an updated version of race_windows_amd64.syso and then run a -race test, I get:

##### Testing packages.
# compress/bzip2.test
C:\workdir\go\pkg\tool\windows_amd64\link.exe: running gcc failed: exit status 1
c:/programdata/chocolatey/lib/mingw/tools/install/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\gopher\AppData\Local\Temp\go-link-1811237475\000002.o:gotsan.cpp:(.text+0xf949): undefined reference to `__sanitizer::DumpProcessMap()'
collect2.exe: error: ld returned 1 exit status
dvyukov accepted this revision.Jun 27 2022, 6:43 AM

Do you have LLVM commit access?

This revision is now accepted and ready to land.Jun 27 2022, 6:43 AM
thanm added a comment.Jun 27 2022, 6:47 AM

Do you have LLVM commit access?

Yes, although it has been a while since I checked anything in. I'll try to dig out my notes and submit it.

This revision was automatically updated to reflect the committed changes.