Python 2.2.3 test_re.py fails with coredump on FreeBSD 5.0, fails also on FreeBSD4.8

Martin v. Löwis martin at v.loewis.de
Sat Jun 21 15:04:09 EDT 2003


pieterb at gewis.nl (PieterB) writes:

> Can anybody, give me a clue:
> a) if this is caused by a FreeBSD5.0 issue, or by Python. 

Yes. :-)

Python causes a stack overflow on FreeBSD. It is a FreeBSD issue, for
having a unreasonable tiny stack, and a Python issue, for not knowing
about that.

>    Can somebody test this on FreeBSD 5.1 or FreeBSD5-CVS?

It has been tested before, and various patches have been applied in
various versions of the software. Everytime it got "fixed", a new
FreeBSD version came along, and broke it again.

This time, it is gcc 3.2, which produces larger stack frames, causing
stack exhaustion earlier.

> b) how can I fix the coredump on FreeBSD 5.0?

I recommend to check out the release22-maint branch of Python, and
copy Modules/_sre.c from there. This is a backport of the patch that
reportedly fixes the problem for 2.3.

> c) what should be done to fix the test on FreeBSD 4.8?

Likewise.

> Can this related to the FreeBSD python/zope/zwiki stability problems
> for FreeBSD.  (see http://zwiki.org/GeneralDiscussion200306). Zwiki
> makes heavy use of regular expressions.

That might be the case.

Regards,
Martin




More information about the Python-list mailing list