Message91727
| Author |
amaury.forgeotdarc |
| Recipients |
Arfrever, amaury.forgeotdarc, loewis, vstinner |
| Date |
2009年08月19日.12:33:57 |
| SpamBayes Score |
6.408954e-07 |
| Marked as misclassified |
No |
| Message-id |
<1250685240.55.0.880064208852.issue6697@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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 consequences...
The code that fails seems pretty common:
PyErr_Format(PyExc_AttributeError,
"'%.50s' object has no attribute '%.400s'",
tp->tp_name, _PyUnicode_AsString(name));
It would be unfortunate to replace all usages of _PyUnicode_AsString to
check the return value.
Martin, what do you think? |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2009年08月19日 12:34:00 | amaury.forgeotdarc | set | recipients:
+ amaury.forgeotdarc, loewis, vstinner, Arfrever |
| 2009年08月19日 12:34:00 | amaury.forgeotdarc | set | messageid: <1250685240.55.0.880064208852.issue6697@psf.upfronthosting.co.za> |
| 2009年08月19日 12:33:58 | amaury.forgeotdarc | link | issue6697 messages |
| 2009年08月19日 12:33:57 | amaury.forgeotdarc | create |
|