New submission from Jeremy Banks <jer...@jeremybanks.ca>:

I was experimenting with the sqlite3 library and noticed that using certain 
strings as identifiers cause bus errors or segfaults. I'm not very familiar 
with unicode, but after some Googling I'm pretty sure this happens when I use 
non-characters or surrogate characters incorrectly.

This causes a bus error:

import sqlite3
c = sqlite3.connect(":memory:")
table_name = '"' + chr(0xD800) + '"'
c.execute("create table " + table_name + " (bar)")

The equivalent Python 2 (replacing chr with unichr) works properly.

----------
components: Library (Lib)
messages: 140381
nosy: jeremybanks
priority: normal
severity: normal
status: open
title: sqlite3 segfaults and bus errors when given certain unicode strings as 
queries
type: crash
versions: Python 3.1

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12569>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to