[ python-Bugs-931848 ] re seems broken on 64-bit machines/linux

SourceForge.net noreply at sourceforge.net
Fri May 7 07:09:56 EDT 2004


Bugs item #931848, was opened at 2004-04-08 13:02
Message generated for change (Comment added) made by misa
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=931848&group_id=5470

Category: Regular Expressions
Group: Python 2.3
Status: Closed
Resolution: Fixed
Priority: 6
Submitted By: Mihai Ibanescu (misa)
Assigned to: Martin v. Löwis (loewis)
Summary: re seems broken on 64-bit machines/linux

Initial Comment:
Hello,

Tested the following piece of code both on ia64 and amd64.

python -c 'import re; print
re.compile(u"[\u002E\u3002\uFF0E\uFF61]").split("a.b.c")'

Expected result:
['a', 'b', 'c']

Actual result: varies depending on the version of glibc
(probably).
On glibc-2.3.2 (Red Hat Enterprise Linux 3 WS) I get back:
['a.b.c']

On glibc-2.3.3 (Fedora Core 2) I get back:
['a.b.', '']

This doesn't happen on i386 architectures.

The above string that I try to compile comes from
encodings/idna.py (and it is used to split a domain
name into components).

Let me know if you need more information on how to
reproduce this.

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

>Comment By: Mihai Ibanescu (misa)
Date: 2004-05-07 07:09

Message:
Logged In: YES 
user_id=205865

I will check to see how UCS2, I remember testing it though
and issuing the same results. Thanks for the fixes, testing
them...

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

Comment By: Martin v. Löwis (loewis)
Date: 2004-05-07 03:19

Message:
Logged In: YES 
user_id=21627

This is fixed now in

sre_compile.py 1.55
test_re.py 1.49
sre.h 2.25
sre_compile.py 1.49.6.1
NEWS 1.831.4.106
sre.h 2.22.16.1

Are you sure it happens in UCS-2 mode as well? The fix I
made can only apply to UCS-4 mode, and is then independent
of the C library.

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

Comment By: Mihai Ibanescu (misa)
Date: 2004-04-08 13:11

Message:
Logged In: YES 
user_id=205865

In both cases, python was built with UCS4, but it happens
with UCS2 just as well.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=931848&group_id=5470



More information about the Python-bugs-list mailing list