New submission from Ben Harper <btharper1...@gmail.com>:
When running the builtin test suite with address sanitizer enabled, one of the ctypes tests causes a use after free demonstrating the danger of using a reference to the inside of a deallocated buffer. This use is detected as an error by the address sanitizer and can be replicated with the following; a stack trace from the resulting failure is attached. export ASAN_OPTIONS="detect_leaks=0" make clean ./configure --with-address-sanitizer --with-pydebug make ./python Lib/ctypes/test/test_stringptr.py StringPtrTestCase -v ---------- components: Tests, ctypes files: asan StringPtrTestCase.txt messages: 337583 nosy: btharper priority: normal severity: normal status: open title: Use after free in ctypes test suite type: behavior versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 Added file: https://bugs.python.org/file48202/asan StringPtrTestCase.txt _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36253> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com