Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#1,673 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
20/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
cpp
Ambito
databases

Direzione di ricerca

Inizia esaminando la durata di DatabaseReference e il comportamento di rimozione dei listener descritti nell’issue, inclusi ValueListener, ChildListener e il callback onFinish utilizzato per le operazioni get. Determina quando un riferimento può essere distrutto in sicurezza senza causare un heap-use-after-free e documenta o riproduci il comportamento previsto per la rimozione dei listener.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

needs-triage new type: question
[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 ?

Lingua principale
C++
Stelle
326
Fork
138
Merge medio
1g 22h
PR unite (30g)
6

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di firebase/firebase-cpp-sdk

Tutte le issue di firebase/firebase-cpp-sdk

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.