This is an archive of the discontinued LLVM Phabricator instance.

[tsan] Fix interceptor names in lit tests for OS X
AbandonedPublic

Authored by kubamracek on Nov 6 2015, 1:45 AM.

Details

Summary

On OS X, the interceptors' function names start with "wrap_", e.g. wrap_malloc. This patch modifies the lit tests that expect to find an intercepted function's name on a stack trace to allow having a prefix.

Diff Detail

Event Timeline

kubamracek updated this revision to Diff 39499.Nov 6 2015, 1:45 AM
kubamracek retitled this revision from to [tsan] Fix interceptor names in lit tests for OS X.
kubamracek updated this object.
kubamracek added reviewers: dvyukov, kcc, samsonov, glider.
dvyukov edited edge metadata.Nov 6 2015, 2:40 AM

Fix call of RenderFrame in PrintStack in tsan_report.cc instead.

Originally, that code stripped prefixes of functions defined in tsan_interceptors.cc only. That logic seems to get lost at some point. So now we will strip interceptor_/wrap_ from all functions (including user ones). If that becomes a problem, we need to fix the stripping logic.

kubamracek abandoned this revision.Nov 11 2015, 12:49 AM

Closing this revision, http://reviews.llvm.org/D14512 supersedes this.

glider edited edge metadata.Nov 12 2015, 4:18 AM

Not that this makes any difference now, but I think there should be no user functions starting with two underscores (and thus no functions starting with wrap or intercept)

Not that this makes any difference now, but I think there should be no user functions starting with two underscores (and thus no functions starting with wrap or intercept)

Just FYI, the OS X wrap_ prefix doesn't have the two underscores.

Ah, that's right. Then Dima's comment is valid, and mine is not.