boost::python handle& operator=() is not implemented correctly
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 45/100
Direzione di ricerca
Individua handle& operator=() nei sorgenti di Boost.Python ed esamina le operazioni di conteggio dei riferimenti mostrate nell’issue. Verifica il comportamento dell’assegnazione in caso di autoassegnazione e conferma che il conteggio dei riferimenti rimanga valido al termine dell’operatore.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The assignment operator for a handle is implemented by first decreasing the reference count of the contained object and then incrementing the one of the right hand side.
python::xdecref(m_p);
m_p = python::xincref(r.m_p);
This is not the correct order but should be the other way round, i.e. first incrementing than decrementing. This is also the effect described in the documentation.
python::xincref(r.m_p)
python::xdecref(m_p);
m_p = r.m_p
By doing it the current way, self assignment increases the reference count of a potentially already freed object.
- Lingua principale
- C++
- Stelle
- 537
- Fork
- 223
- Merge medio
- 11h 22m
- PR unite (30g)
- 2
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di boostorg/python
-
numpy::from_data calls vector::front and crashes (or has UB) when called with a scalar object Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
-
BoostDetectToolset-1.90.0.cmake file not found in an include() call in boost_python-config.cmake Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
Tutte le issue di boostorg/python
Issue simili
-
AuTest Bug Tests
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/trafficserver#13714 ·
-
bug build
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
facebookincubator/velox#19143 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
tenstorrent/tt-metal#57393 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
objectionary/eo-graphs#74 ·