-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 an issue when the error is nil but is different than nil #11335
Conversation
47c6a86
to
4f20451
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #11335 +/- ##
==========================================
+ Coverage 91.50% 91.54% +0.03%
==========================================
Files 430 428 -2
Lines 20205 20235 +30
==========================================
+ Hits 18489 18524 +35
+ Misses 1341 1337 -4
+ Partials 375 374 -1 ☔ View full report in Codecov by Sentry. |
0829833
to
f2fde25
Compare
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
f2fde25
to
962cb00
Compare
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.
Is this needed everywhere .Error()
is called?
I don't think this is scalable. I think we should probably do:
|
…s Undefined Behavior (#11349) The main issue is that after #10910 the err variable is shared between requests because it uses the same address as the err defined outside the func. This is an UB because we are overwriting memory and will cause crashes like #11335, where the check for not nil happens then gets overwrite with nil and crashes. Fixes #11350 --------- Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.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.
Looks good. It would be nice to know which piece of code is responsible for the nil-error object and try to fix it.
It was the race condition we fixed last night. #11349 |
…s Undefined Behavior (open-telemetry#11349) The main issue is that after open-telemetry#10910 the err variable is shared between requests because it uses the same address as the err defined outside the func. This is an UB because we are overwriting memory and will cause crashes like open-telemetry#11335, where the check for not nil happens then gets overwrite with nil and crashes. Fixes open-telemetry#11350 --------- Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
Is this PR still needed now that the race condition has been fixed? |
No. I don't think the PR is needed, maybe if we can get #11335 (comment) into an issue and decide what guard we want in the future. |
Opened #11407 to track adding concurrency tests |
No description provided.