[ python-Bugs-1120452 ] Python 2.4.0 crashes with a segfault, EXAMPLE ATTACHED

SourceForge.net noreply at sourceforge.net
Tue Feb 22 15:51:49 CET 2005


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

Category: Regular Expressions
Group: Python 2.4
Status: Open
Resolution: None
Priority: 7
Submitted By: Viktor Ferenczi (complex)
Assigned to: Nobody/Anonymous (nobody)
Summary: Python 2.4.0 crashes with a segfault, EXAMPLE ATTACHED

Initial Comment:
Running the attached example crashes python 2.4.0 on linux (segfault) and Windows. Python is compiled on Debian Linux 3.0r3 (Woody). On Windows XP, I used the MSI installer downloaded from python.org

This may be a problem with the regular expression module, but I'm not sure. Please assign a new category if it appears as a regexp bug.

This bug causes permanent crashes in my new WEB applications. Old apps not using regexp and PyMeld seem to run correctly.

Thanks for 2.4.1.

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

>Comment By: Michael Hudson (mwh)
Date: 2005-02-22 14:51

Message:
Logged In: YES 
user_id=6656

Well, I still can't make it crash.  Can one of you provide a crashing driver 
script?  Better still would be finding which regexp and which input is the 
problem.

(Unless it's a memory-scribble random crasher type bug...)

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

Comment By: Viktor Ferenczi (complex)
Date: 2005-02-22 13:07

Message:
Logged In: YES 
user_id=142612

This bug is a segfault, a real crash using only the stock 2.4.0. It has been reproduced correctly by jimjjewett. It seems to be a regexp related bug. I've changed the category to pass this bug to a regexp expert. Thanks for any help. - Complex

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

Comment By: Kurt B. Kaiser (kbk)
Date: 2005-02-20 01:56

Message:
Logged In: YES 
user_id=149084

The restart in IDLE will occur if the subprocess is terminated or
segfaults.

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

Comment By: Jim Jewett (jimjjewett)
Date: 2005-02-11 19:55

Message:
Logged In: YES 
user_id=764593

__gettattr__ alone can provoke the crash, if used several 
times, and on sub-melds.

I can print both StreamURL1 and StreamURL2.

If I ask it for p.StreamURL2.src and p.StreamURL1.value, 
it prints whichever one I ask for first, and then crashes on 
the second.  I did get it to print both (not assign, just 
__getattr__) by first getting several other attributes from 
p.StreamURL1, including some that didn't exist, so that 
there was a raise AttributeError in between.  Doing this a 
half dozen times, I provoked a MemoryError.

"""
>>> p.StreamURL1.value
'mss://stream.url'
>>> p.StreamURL2.src

Traceback (most recent call last):
  File "<pyshell#68>", line 1, in -toplevel-
    p.StreamURL2.src
  File "C:\Python24\Lib\site-packages\segfault240\PyMeld.
py", line 475, in __getattr__
    start = self._findElementFromID(name)
  File "C:\Python24\Lib\site-packages\segfault240\PyMeld.
py", line 425, in _findElementFromID
    match = _findIDMatch(nodeID, subset)
  File "C:\Python24\Lib\site-packages\segfault240\PyMeld.
py", line 282, in _findIDMatch
    match = re.search(thisRE, text)
  File "C:\Python24\lib\sre.py", line 134, in search
    return _compile(pattern, flags).search(string)
MemoryError
>>> 
"""



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

Comment By: Jim Jewett (jimjjewett)
Date: 2005-02-11 19:36

Message:
Logged In: YES 
user_id=764593

Partially reproduced on Windows XP.  (Using the stock 2.4.
0 msi)  

Just loading it in IDLE and hitting F5 (run), it prints None, 
as though it had succeeded perfectly.

Typing in the commands from index.py by hand, I can get 
it to give me the "encountered an error;  Tell Microsoft?" 
box, but IDLE only restarts instead of actually crashing.

There seems to a problem between the __getattr__ and 
the __setattr__ in PyMeld.  

"""
>>> p=Meld(open('player.html','rb').read())
>>> p.StreamURL1.value
'mss://stream.url'
>>> p.StreamURL2
<PyMeld.Meld instance at 0x00B455F8>
>>> p.StreamURL2.src
'mms://stream.url'

>>> v=Video()
>>> v.stream
's'
>>> p.StreamURL1.value=v.stream
>>> p.StreamURL1.value

>>> ================================ 
RESTART 
================================
>>> 
"""


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

Comment By: Michael Hudson (mwh)
Date: 2005-02-11 14:57

Message:
Logged In: YES 
user_id=6656

What do you do to make it crash?  "python index.py"?

It doesn't fail for me with CVS HEAD.

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

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


More information about the Python-bugs-list mailing list