-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: cannot lazily link against GLS accessors #127
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #127 +/- ##
==========================================
- Coverage 52.53% 52.47% -0.07%
==========================================
Files 86 87 +1
Lines 4492 4503 +11
==========================================
+ Hits 2360 2363 +3
- Misses 1886 1892 +6
- Partials 246 248 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
In order to be able to lazily link against GLS accessors, these need to be declared as variables instead of functions. This allows creation of bindings on the other side that can be conditionally satisffied by the existence of initialized declarations somewhere else. Adds an integration test to demonstrate it is possible to build programs with and without the runtime modification using this technique.
b6fc3f9
to
9fd7dde
Compare
Signed-off-by: Eliott Bouhana <eliott.bouhana@datadoghq.com>
Signed-off-by: Eliott Bouhana <eliott.bouhana@datadoghq.com>
Signed-off-by: github-actions on behalf of eliottness <github-actions@github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
My main question is: Should g.__dd_gls
be automatically inherited by child goroutines like g.labels
? This PR can merged without addressing this question, but I'd like this to be discussed and written down somewhere.
…enablement # Conflicts: # .github/workflows/tests.yml
In order to be able to lazily link against GLS accessors, these need to be declared as variables instead of functions. This allows creation of bindings on the other side that can be conditionally satisffied by the existence of initialized declarations somewhere else.
Adds an integration test to demonstrate it is possible to build programs with and without the runtime modification using this technique.
Enables: DataDog/dd-trace-go#2761
JIRA: APPSEC-53654