You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with "-S -race" shows that g is inlined into F, and the pointer assignment is instrumented with a race detector call, which seemingly defeats the intention of adding //go:norace.
Probably the easiest solution is that when instrumenting, we should treat //go:norace functions as non-inlinable.
Even better would be to avoid inlining //go:norace function calls only into instrumented functions (similar to how CL 102815 still allows inlining runtime calls within package runtime even during instrumented builds), but that would require tracking the //go:norace pragma across compilation units, which is a bit more involved.
Currently, compiling this package:
with "-S -race" shows that g is inlined into F, and the pointer assignment is instrumented with a race detector call, which seemingly defeats the intention of adding //go:norace.
Probably the easiest solution is that when instrumenting, we should treat //go:norace functions as non-inlinable.
Even better would be to avoid inlining //go:norace function calls only into instrumented functions (similar to how CL 102815 still allows inlining runtime calls within package runtime even during instrumented builds), but that would require tracking the //go:norace pragma across compilation units, which is a bit more involved.
/cc @cherrymui
The text was updated successfully, but these errors were encountered: