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 Storage usage of invalid pointers. #1574

Merged
merged 4 commits into from
Apr 23, 2024
Merged

Conversation

jonsimantov
Copy link
Contributor

@jonsimantov jonsimantov commented Apr 19, 2024

Description

Provide details of the change, and generalize the change in the PR title above.

As reported in #1570, if StorageReference::GetFile() is called from a non-UI thread, the const char* path passed in is not preserved and could have been deleted by the calling code once the FIRStorage native call occurs in the main thread later.

Fix this by creating the URL from the local file path outside outside of the thread dispatch block. (Similar to what PutFile() already does.)


Testing

Describe how you've tested these changes. Link any manually triggered Integration tests or CPP binary SDK Packaging Github Action workflows, if applicable.

Integration tests in this PR.


Type of Change

Place an x the applicable box:

  • Bug fix. Add the issue # below if applicable.
  • New feature. A non-breaking change which adds functionality.
  • Other, such as a build process or documentation change.

Notes

  • Bug fixes and feature changes require an update to the Release Notes section of release_build_files/readme.md.
  • Read the contribution guidelines CONTRIBUTING.md.
  • Changes to the public API require an internal API review. If you'd like to help us make Firebase APIs better, please propose your change in a feature request so that we can discuss it together.

@jonsimantov jonsimantov added the tests-requested: quick Trigger a quick set of integration tests. label Apr 19, 2024
@github-actions github-actions bot added tests: in-progress This PR's integration tests are in progress. and removed tests-requested: quick Trigger a quick set of integration tests. labels Apr 19, 2024
Copy link

github-actions bot commented Apr 19, 2024

✅  Integration test succeeded!

Requested by @jonsimantov on commit 507dfa2
Last updated: Tue Apr 23 14:24 PDT 2024
View integration test log & download artifacts

@github-actions github-actions bot added the tests: succeeded This PR's integration tests succeeded. label Apr 19, 2024
@firebase-workflow-trigger firebase-workflow-trigger bot removed the tests: in-progress This PR's integration tests are in progress. label Apr 19, 2024
@jonsimantov jonsimantov requested a review from a-maurice April 19, 2024 22:34
@jonsimantov jonsimantov marked this pull request as ready for review April 19, 2024 22:34
@jonsimantov jonsimantov merged commit 507dfa2 into main Apr 23, 2024
30 checks passed
@github-actions github-actions bot added tests: in-progress This PR's integration tests are in progress. tests: succeeded This PR's integration tests succeeded. and removed tests: succeeded This PR's integration tests succeeded. labels Apr 23, 2024
@firebase-workflow-trigger firebase-workflow-trigger bot removed the tests: in-progress This PR's integration tests are in progress. label Apr 23, 2024
@firebase firebase locked and limited conversation to collaborators May 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tests: succeeded This PR's integration tests succeeded.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants