Skip to content
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: EXC_BAD_ACCESS in SentryTracer #2697

Merged
merged 1 commit into from
Feb 16, 2023
Merged

Conversation

philipphofmann
Copy link
Member

@philipphofmann philipphofmann commented Feb 16, 2023

📜 Description

Fix EXC_BAD_ACCESS in SentryTracer by using a weak reference when dispatching the idle timeout to avoid accessing a garbage pointer.

💡 Motivation and Context

Fixes GH-2696

💚 How did you test it?

Unit test.

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Fix EXC_BAD_ACCESS in SentryTracer by using a weak reference when dispatching the
idle timeout to avoid accessing a garbage pointer.

Fixes GH-2696
@codecov
Copy link

codecov bot commented Feb 16, 2023

Codecov Report

Merging #2697 (11dd192) into main (e9782e1) will decrease coverage by 0.06%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2697      +/-   ##
==========================================
- Coverage   80.65%   80.60%   -0.06%     
==========================================
  Files         247      247              
  Lines       22898    22934      +36     
  Branches    10136    10155      +19     
==========================================
+ Hits        18468    18485      +17     
- Misses       3968     3988      +20     
+ Partials      462      461       -1     
Impacted Files Coverage Δ
Sources/Sentry/SentryTracer.m 97.29% <100.00%> (-0.56%) ⬇️
Sources/Sentry/SentryProfilingLogging.mm 0.00% <0.00%> (-51.86%) ⬇️
Sources/Sentry/include/SentryMachLogging.hpp 62.50% <0.00%> (-12.50%) ⬇️
Sources/Sentry/include/SentryProfilingLogging.hpp 45.45% <0.00%> (-9.10%) ⬇️
Sources/Sentry/SentryMachLogging.cpp 2.51% <0.00%> (-1.01%) ⬇️
Sources/Sentry/SentryANRTracker.m 100.00% <0.00%> (ø)
Sources/Sentry/SentryCrashIntegration.m 98.66% <0.00%> (+0.03%) ⬆️
Sources/Sentry/SentryNetworkTracker.m 95.34% <0.00%> (+0.06%) ⬆️
Sources/Sentry/SentryUser.m 95.74% <0.00%> (+2.97%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e9782e1...11dd192. Read the comment docs.

@philipphofmann philipphofmann merged commit 0454d35 into main Feb 16, 2023
@philipphofmann philipphofmann deleted the fix/crash-sentry-tracer branch February 16, 2023 14:13
@brustolin brustolin mentioned this pull request Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EXC_BAD_ACCESS (SIGSEGV) in -[SentryDispatchQueueWrapper dispatchAfter:block:]
2 participants