Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6697
___
___
Python-bugs-list
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
The problem is actually wider::
getattr(None, \udc80)
Segmentation fault
An idea would be to change _PyUnicode_AsDefaultEncodedString and allow
unpaired surrogates (utf8+surrogateescape, as explained in PEP383), but
I fear the
Marc-Andre Lemburg m...@egenix.com added the comment:
Amaury Forgeot d'Arc wrote:
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
The problem is actually wider::
getattr(None, \udc80)
Segmentation fault
An idea would be to change _PyUnicode_AsDefaultEncodedString and
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
Do you suggest to remove all usages of _PyUnicode_AsString() and
_PyUnicode_AsStringAndSize()?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6697
Marc-Andre Lemburg m...@egenix.com added the comment:
Amaury Forgeot d'Arc wrote:
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
Do you suggest to remove all usages of _PyUnicode_AsString() and
_PyUnicode_AsStringAndSize()?
In the short-term, I suggest that all uses that do
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
The %U format seems adequate for this purpose - actually
PyObject_GenericSetAttr uses it already.
Yes, the exception message will contain the same lone UTF-8
surrogates; this is not a problem because sys.stderr uses the
backslashreplace
Martin v. Löwis mar...@v.loewis.de added the comment:
It would be unfortunate to replace all usages of _PyUnicode_AsString to
check the return value.
I agree with MAL: we do need to check for errors returned from
_PyUnicode_AsString, and it would be best if we created a fail-safe
version of
STINNER Victor victor.stin...@haypocalc.com added the comment:
The error occurs in Py_Main(), on _PyUnicode_AsString(commandObj). The
problem is that _PyUnicode_AsString() is not checked for error. Here is
a patch fixing two errors:
- display on error message instead of a crash on
New submission from Arfrever Frehtes Taifersar Arahesis
arfrever@gmail.com:
Python 3.1 segfaults when invalid UTF-8 characters are passed from
command line.
In BASH shell you can run:
$ python3.1 -c $'print(\x80)'
Segmentation fault
In other POSIX-compatible shells you can save the
Changes by R. David Murray rdmur...@bitdance.com:
--
priority: - high
stage: - test needed
type: - crash
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6697
___
Changes by R. David Murray rdmur...@bitdance.com:
--
components: +Interpreter Core
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6697
___
___
Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment:
I'm attaching crashers/invalid_utf8_characters_from_command_line.py.
--
Added file:
http://bugs.python.org/file14712/invalid_utf8_characters_from_command_line.py
___
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
Removed file:
http://bugs.python.org/file14712/invalid_utf8_characters_from_command_line.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6697
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
Added file:
http://bugs.python.org/file14713/invalid_utf8_characters_from_command_line.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6697
Changes by R. David Murray rdmur...@bitdance.com:
--
stage: test needed - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6697
___
___
15 matches
Mail list logo