https://reviews.llvm.org/D28596 exposed OnPrint in the global namespace,
which can cause collisions with user-defined OnPrint() functions.
Details
Diff Detail
- Build Status
Buildable 38843 Build 38842: arc lint + arc unit
Event Timeline
For the Go version we have a non-weak declaration without definition. How are we going to roll out the change? We would need to update llvm and the hook implementation atomically. But then I am confused how it works today. We have a non-extern "C" hook definition, so build should be broken for the last year...
I don't see TSAN_EXTERNAL_HOOKS defined anywhere internally. So presumably the non-weak declaration was never used.
I'm also not sure exactly why it's working internally. Apparently the extern "C" doesn't matter when compiling the race detector stuff, but I do get a linking error if I change the symbol name.
Let's temporarily keep the OnPrint symbol for Go. This will give us time to migrate to __sanitizer_on_print internally and then remove OnPrint here.