Session could be changed by garbage collector
Open
Core
Indigo API
- Dominant language
- C++
- Stars
- 406
- Forks
- 134
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 24
Description
`setSessionId()` could be called for disposed object at the same time as for the other object:
``` python
i1 = Indigo() # sid 1
i2 = Indigo() # sid 2
m1 = i1.createMolecule() # sid 1, id 1001
m2 = i2.createMolecule() # sid 2, id 1001
# Now imitate the problem that could appear when m1.smiles() and m2.dispose() are called at the same time:
i1._setSessionId() # sid changed to 1
i2._lib.indigoFree(m2.id) # sid 1 object 1001 will be removed instead of sid 2 object 1002
m1.smiles() # would produce an error
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.