[issue36073] sqlite crashes with converters mutating cursor
Sergey Fedoseev
report at bugs.python.org
Fri Feb 22 02:44:47 EST 2019
New submission from Sergey Fedoseev <fedoseev.sergey at gmail.com>:
It's somewhat similar to bpo-10811, but for converter function:
In [197]: import sqlite3 as sqlite
...: con = sqlite.connect(':memory:', detect_types=sqlite.PARSE_COLNAMES)
...: cur = con.cursor()
...: sqlite.converters['CURSOR_INIT'] = lambda x: cur.__init__(con)
...:
...: cur.execute('create table test(x foo)')
...: cur.execute('insert into test(x) values (?)', ('foo',))
...: cur.execute('select x as "x [CURSOR_INIT]", x from test')
...:
[1] 25718 segmentation fault python manage.py shell
Similar to bpo-10811, proposed patch raises ProgrammingError instead of crashing.
----------
components: Extension Modules
messages: 336283
nosy: sir-sigurd
priority: normal
severity: normal
status: open
title: sqlite crashes with converters mutating cursor
type: crash
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36073>
_______________________________________
More information about the Python-bugs-list
mailing list