[ python-Bugs-1032615 ] Odd behavior with unicode.translate on OSX.

SourceForge.net noreply at sourceforge.net
Wed Sep 29 12:42:25 CEST 2004


Bugs item #1032615, was opened at 2004-09-22 15:00
Message generated for change (Comment added) made by doerwalter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1032615&group_id=5470

Category: Unicode
Group: Platform-specific
>Status: Closed
>Resolution: Duplicate
Priority: 5
Submitted By: Jeremy Fincher (jemfinch)
Assigned to: M.-A. Lemburg (lemburg)
Summary: Odd behavior with unicode.translate on OSX.

Initial Comment:
d = {ord('f'): 'eff '}
for i in range(100):
....s = u'f' * i
....print i
....s.translate(d)

On my Panther laptop, that fails at i=25 with a MemoryError:

*** malloc: vm_allocate(size=1677725696) failed (error code=3)
*** malloc[2346]: error: Can't allocate region
Traceback (most recent call last):
..File "<stdin>", line 4, in ?
MemoryError

It works fine on the Linux and BSD boxes I was able to test on, 
though.

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

>Comment By: Walter Dörwald (doerwalter)
Date: 2004-09-29 12:42

Message:
Logged In: YES 
user_id=89016

Thanks for the check, closing the report.

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

Comment By: Rune Holm (titanstar)
Date: 2004-09-29 04:56

Message:
Logged In: YES 
user_id=858364

I can reproduce this on panther with python 2.3 (Apple Computer, Inc. 
build 1495). However, with the current 2.4 CVS head (as of 29 Sept) 
compiled on the same computer, this bug is gone.

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

Comment By: Walter Dörwald (doerwalter)
Date: 2004-09-22 19:23

Message:
Logged In: YES 
user_id=89016

This is probably a duplicate of bug 828737 ("unicode translate 
leaks memory"), which should be fixed in the current version 
2.3.4. Which version of Python are you using?

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

Comment By: Jeremy Fincher (jemfinch)
Date: 2004-09-22 15:10

Message:
Logged In: YES 
user_id=99508

Oops, that 'eff ' should be u'eff ', obviously.  Sorry about that.

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

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


More information about the Python-bugs-list mailing list