This is an archive of the discontinued LLVM Phabricator instance.

TSAN module_ctor symbol name can change with -funique-internal-linkage-names
AbandonedPublic

Authored by tmsriram on Feb 2 2021, 3:24 PM.

Details

Summary

tsan.module_ctor symbol name can change with -funique-internal-linkage-names which is captured in this patch.

With option, -funique-internal-linkage-names, the name of tsan.module_ctor is actually tsan.module_ctor.__uniq.[0-9]+

The option -funique-internal-linkage-names adds a sufix (.uniq.[0-9]+) to every internal linkage function to keep the name unique in the final binary. tsan.module_ctor is one such function which has internal linkage. This function name is checked in ThreadSanitizer.cpp to make sure we don't insturment it with tsan_func_{entry,exit}. This patch makes sure we even check the name when -funique-internal-linakge-names is used.

Diff Detail

Event Timeline

tmsriram created this revision.Feb 2 2021, 3:24 PM
tmsriram requested review of this revision.Feb 2 2021, 3:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 2 2021, 3:24 PM
tmsriram added a reviewer: kcc.Feb 4 2021, 9:08 AM
tmsriram abandoned this revision.Mar 10 2021, 9:48 PM

D96109 moved the adding of suffixes to clang front end and this will not be an issue any more with llvm created functions.