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

[Question] heap-use-after-free after deleting database::DatabaseReference #1673

Open
zimml opened this issue Nov 23, 2024 · 1 comment
Open

Comments

@zimml
Copy link

zimml commented Nov 23, 2024

[REQUIRED] Please fill in the following fields:

  • Pre-built SDK from the website or open-source from this repo: open source from this repo
  • Firebase C++ SDK version: all
  • Main Firebase Components in concern: Database
  • Other Firebase Components in use: -
  • Platform you are using the C++ SDK on: Linux
  • Platform you are targeting: iOS, Android, Destkop

[REQUIRED] Please describe the question here:

I have lot of issue with "heap-use-after-free". To what I understand, the issue is linked to the fact reference is removed while beeing still in use in the SDK. When I made some "get" I just wait for the onFinish callback to be sure that firebase SDK don't need the reference anymore. But when using with Listener (ValueListener or ChildListener) we have no callback saying that the remove listener is finished. Then it's not clear when the reference can be safely destroyed. I tried lot of different approach but I always ends in use after free issue. Where can I find more informations about when a reference can be destroyed without risking a crash ?

@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants