Antoine Pitrou [EMAIL PROTECTED] added the comment:
Hirokazu, does replacing the following line (rather than changing the
type of the `ch` variable):
ch = *s;
with
ch = (unsigned char) *s;
fix the crash as well?
--
keywords: +patch
nosy: +pitrou
Hirokazu Yamamoto [EMAIL PROTECTED] added the comment:
With this patch? Yes, it fixed crash.
Index: Objects/unicodeobject.c
===
--- Objects/unicodeobject.c (revision 65223)
+++ Objects/unicodeobject.c (working copy)
@@
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:
VS8 and VS9 are immune to the crash, even if the exception message
differ between release and debug builds.
VC6 crashes, and the proposed patch fixes the problem there as well.
--
nosy: +amaury.forgeotdarc
Antoine Pitrou [EMAIL PROTECTED] added the comment:
Selon Hirokazu Yamamoto [EMAIL PROTECTED]:
With this patch? Yes, it fixed crash.
Thanks!
# But I don't know whether this behavior is right or not
As the name implies, utf7 is a 7-bit coding of Unicode... bytes = 0x80 must
raise an
Antoine Pitrou [EMAIL PROTECTED] added the comment:
Should be fixed in r65227. Please reopen if there's still a problem.
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2242
___
Antoine Pitrou [EMAIL PROTECTED] added the comment:
On second thought, perhaps it should also be backported to 2.5, so I'm
leaving the bug open.
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2242
___
Changes by Antoine Pitrou [EMAIL PROTECTED]:
--
resolution: - accepted
versions: -Python 2.6, Python 3.0
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2242
___
Antoine Pitrou [EMAIL PROTECTED] added the comment:
I've committed the fix for 2.5 in r65234, can somebody try it out with
the failing MSVC version?
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2242
___
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:
I confirm that r65234 for 2.5 corrects the crash.
(Windows XP, Visual Studio 6)
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2242
___
Antoine Pitrou [EMAIL PROTECTED] added the comment:
Thanks Amaury!
--
resolution: accepted - fixed
status: open - closed
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2242
___
Chris Palmer added the comment:
You could also fix the problem by using iswalnum function instead of
isalnum. Sorry I didn't mention this in the original report.
http://msdn2.microsoft.com/en-us/library/k84c0490(VS.71).aspx
__
Tracker [EMAIL PROTECTED]
New submission from Chris Palmer:
When decoding some data as UTF-7 with the optional ignore argument,
Python (I am using 2.5.2) crashes. This happens only on Windows Vista (I
also tried Py 2.5.1 on Windows XP, Ubuntu 7, and FreeBSD 6). To
reproduce, set WinDbg as your post-mortem debugger and
Hirokazu Yamamoto added the comment:
I reproduced this bug with VC6 + Win2000SP4 + following code.
'+\xc1'.decode(utf7, ignore)
and this simple patch prevented crash.
Index: Objects/unicodeobject.c
===
--- Objects/unicodeobject.c
Hirokazu Yamamoto added the comment:
One more thing. ignore is not needed.
'+\xc1'.decode(utf7)
crashed my interpreter.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2242
__
Changes by Georg Brandl:
--
priority: - urgent
severity: normal - urgent
versions: +Python 2.6, Python 3.0
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2242
__
___
15 matches
Mail list logo