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

[PLAT-11750] Handle edge case when capturing a URL request with a null URL before Bugsnag is initialized #253

Merged
merged 1 commit into from Mar 15, 2024

Conversation

kstenerud
Copy link
Contributor

Goal

Any spans created before Bugsnag is initialized get stored in an "early spans" list. There is an edge case where a URL request with a nil URL causes the span code to return a nil span, which crashes when we try to add the resulting nil pointer to the "early spans" list.

Changeset

Add a nil guard around the span code.

Testing

Added repro case as an e2e test.

Copy link

github-actions bot commented Mar 12, 2024

BugsnagPerformance.framework binary size did not change - 510,264 bytes

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0%      +4  +0.0%      +4    __TEXT,__text
  -0.0%      -4  -0.0%      -4    [__TEXT]
  [ = ]       0  [ = ]       0    TOTAL

Generated by 🚫 Danger

@kstenerud kstenerud merged commit 968eb48 into next Mar 15, 2024
21 checks passed
@kstenerud kstenerud deleted the PLAT-11750-null-url-crash branch March 15, 2024 08:59
@kstenerud kstenerud mentioned this pull request Mar 18, 2024
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.

None yet

2 participants