[Python-Dev] Include ctypes into core Python?

Josiah Carlson jcarlson at uci.edu
Wed Jan 11 00:57:28 CET 2006


Thomas Wouters <thomas at xs4all.net> wrote:
> centurion:~ > python < .
> Segmentation fault
> 
> [...]
> >>> sys.setrecursionlimit(1<<30)
> >>> f = lambda f:f(f)
> >>> f(f)
> Segmentation fault
> 
> There's more, all from Python itself. And sure, "well, don't do that then"
> is a perfectly valid response to most of these harebrained tricks, but it
> does put a lie to the 'uncrashable python' idea :)

Many of the "segfaulting Python" issues are platform specific.  On a
platform with a sane malloc, you get a MemoryError for the recursion. 
On a platform which doesn't see the current path as a readable file, you
get "Access is denied." on the redirection attempt.

As always, I'm sure that reasonable patches which work around such
segfaulting cases will be acceptable, though remember that it may not be
clear how to work around them.


 - Josiah



More information about the Python-Dev mailing list