[Question] heap-use-after-free after deleting database::DatabaseReference
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 20/100
Research direction
Start by reviewing the DatabaseReference lifetime and listener-removal behavior described in the issue, including ValueListener, ChildListener, and the onFinish callback used for get operations. Determine when a reference can be safely destroyed without a heap-use-after-free, and document or reproduce the expected behavior for listener removal.
Written by the indexing model from the issue text.
Description
[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 ?
- Dominant language
- C++
- Stars
- 326
- Forks
- 138
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 6
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from firebase/firebase-cpp-sdk
-
new type: question
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
firebase/firebase-cpp-sdk#1926 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
firebase/firebase-cpp-sdk#1905 · 2 comments ·
-
api: firestore
Difficulty 5/5 Over a week Newbie friendliness 35/100
firebase/firebase-cpp-sdk#1920 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 70/100
firebase/firebase-cpp-sdk#1904 · 1 comment ·
-
new type: question
Difficulty 4/5 3-5 days Newbie friendliness 45/100
firebase/firebase-cpp-sdk#1892 · 1 comment ·
All issues in firebase/firebase-cpp-sdk
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
drogonframework/drogon#2605 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
ArthurSonzogni/FTXUI#1363 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
MiSTer-devel/Main_MiSTer#1325 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100