[Question] heap-use-after-free after deleting database::DatabaseReference
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 20/100
Hướng nghiên cứu
Bắt đầu bằng việc xem xét vòng đời của DatabaseReference và hành vi xóa listener được mô tả trong issue, bao gồm ValueListener, ChildListener và callback onFinish được dùng cho các thao tác get. Xác định khi nào một reference có thể được hủy an toàn mà không gây ra heap-use-after-free, đồng thời ghi lại hoặc tái hiện hành vi mong đợi khi xóa listener.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
[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 ?
- Ngôn ngữ chính
- C++
- Star
- 326
- Fork
- 138
- Merge trung bình
- 1 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của firebase/firebase-cpp-sdk
-
[FR] Support desktop Linux on aarch64/arm (#error Unknown Linux architecture in app_common.cc)Đang mởnew type: question
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
firebase/firebase-cpp-sdk#1926 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
firebase/firebase-cpp-sdk#1905 · 2 bình luận ·
-
api: firestore
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
firebase/firebase-cpp-sdk#1920 · 3 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 70/100
firebase/firebase-cpp-sdk#1904 · 1 bình luận ·
-
new type: question
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
firebase/firebase-cpp-sdk#1892 · 1 bình luận ·
Tất cả issue của firebase/firebase-cpp-sdk
Issue tương tự
-
`enzymexla.linalg.lu` lowering fails for a tall matrix: the permutation is built with the pivot typeĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
EnzymeAD/Enzyme-JAX#3286 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
apache/iceberg-cpp#973 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add c++23 mapping to nvccĐang mởfeature request
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày