[Python-bugs-list] [Bug #132817] test_ucn fails on OpenVMS - AssertionError

noreply@sourceforge.net noreply@sourceforge.net
Sun, 18 Feb 2001 08:34:47 -0800


Bug #132817, was updated on 2001-Feb-17 05:54
Here is a current snapshot of the bug.

Project: Python
Category: Unicode
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Submitted by: zessin_5
Assigned to : effbot
Summary: test_ucn fails on OpenVMS - AssertionError

Details: test_ucn

On OpenVMS, this test fails with the following error message:

test test_ucn crashed -- exceptions.AssertionError: failed
 to raise an exception when given a bogus character name


How can I diagnose this?


Follow-Ups:

Date: 2001-Feb-18 08:34
By: tim_one

Comment:
/F, I'm re-opening this until it's understood.  It's clear that the test
"worked" by accident before, yes?  I stepped thru it ("N{blah}") in the
debugger on Windows, under the old code.  The reason it worked then is
that, in PyUnicode_DecodeUnicodeEscape, the stack vrbl "chr" remained
uninitialized all the way to label "store:", where a series of tests then
checked this stack trash against various ranges.  On Windows the trash
happened to be the too-large-for-Unicode 0x0063f9dc, so triggered a
different error by accident.  Presumably under OpenVMS, the trash passed
those tests by accident.

Perhaps it's impossible to ever test stack trash now, but I'd feel better
if the code covered its ass there anyway.  You?
-------------------------------------------------------

Date: 2001-Feb-18 03:46
By: effbot

Comment:
thanks for spotting the typo.  just wish I knew why
this didn't show up on any other platform...
-------------------------------------------------------

Date: 2001-Feb-17 14:37
By: zessin_5

Comment:
Here is the result from my debugging:

UNICODEOBJECT.C
if (!ucnhash_CAPI->getcode(start, endBrace-start, &chr)) {

calls:
UNICODEDATA.C:
getcode(const char* name, int namelen, Py_UCS4* code)
{

There are 4 'return's in getcode().
After I replace the 'return -1;' with 'return 0;'
I get the exceptions.
-------------------------------------------------------

Date: 2001-Feb-17 10:20
By: tim_one

Comment:
Assigned to /F.

zessin_5, look at test_ucn.py, if you want.  The error in question is
raised in only one place, verifying that

"\N{blah}"

raises UnicodeError when passed thru unicode-escape.  Don't know why it's
not on your platform.

-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=132817&group_id=5470