[issue6763] Crash on mac os x leopard in mimetypes.guess_type (or PyObject_Malloc)

Ronald Oussoren report at bugs.python.org
Wed May 5 21:47:57 CEST 2010


Ronald Oussoren <ronaldoussoren at mac.com> added the comment:

The script works fine for me (OSX 10.6.3, /usr/bin/python2.5, /usr/bin/python2.6, a recent build of 2.6.x, a recent build of 3.2 and the trunk)

The breakit example in msg93828 works in 64-bit binaries, and fails on 32-bit ones. This is almost certainly a stack overrun: I can remove the crash by increasing the stacksize using thread.stacksize(N) for a sufficiently large value of N.  (I don't mention a value for N because I don't know yet what the minimum size is to avoid the crash).

There are three possible actions w.r.t. this:

1) Ignore the issue (users can call thread.stack_size when they
   want deep recursion in threads)

2) Reduce the recursion limit on OSX to something that fits in the 
   default stack size of pthread

3) Increase the default stack size for new threads.

I have a slight preference for the first choice, although the last choice would be fine too. Reducing the recursion limit would also harm code that uses deep recursion on the main thread, which is why I'd be -1 on that.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6763>
_______________________________________


More information about the Python-bugs-list mailing list