Closed xiaxinmeng closed 1 year ago
The following code (test.py) starts twice of a elementtree and crashes gpython after closed. The memory is double freed in tcache 2.
Crash message: AAAABBBB AAAABBBB free(): double free detected in tcache 2 Aborted (core dumped)
test.py
import _elementtree as et class X(str): def __del__(self): print(elem.text) b = et.TreeBuilder() b.start('test') b.data(['AAAA', X('BBBB')]) b.start('test2') elem = b.close() print(elem.text)
Environment:gpython 0.1.0 on Ubuntu 18.04, and gpython main(https://github.com/go-python/gpython/commit/6f8e06a4660709ab44398d8b1a18738aa407b1c3 on Oct 5)
gpython doesn't come with the _elementtree module - where did you get these from?
_elementtree
Please give steps to reproduce with gpython
gpython
Thanks
The following code (test.py) starts twice of a elementtree and crashes gpython after closed. The memory is double freed in tcache 2.
Crash message: AAAABBBB AAAABBBB free(): double free detected in tcache 2 Aborted (core dumped)
test.py
Environment:gpython 0.1.0 on Ubuntu 18.04, and gpython main(https://github.com/go-python/gpython/commit/6f8e06a4660709ab44398d8b1a18738aa407b1c3 on Oct 5)