[Python-bugs-list] [ python-Bugs-483802 ] How to Crash Python In 3 Easy Steps :)

noreply@sourceforge.net noreply@sourceforge.net
Tue, 20 Nov 2001 19:56:10 -0800


Bugs item #483802, was opened at 2001-11-20 06:48
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=483802&group_id=5470

Category: Python Interpreter Core
Group: Platform-specific
>Status: Closed
Resolution: Fixed
Priority: 5
Submitted By: Andrew Bennetts (spiv)
Assigned to: Anthony Baxter (anthonybaxter)
Summary: How to Crash Python In 3 Easy Steps :)

Initial Comment:
This is easy to demonstrate:

Python 2.1.1 (#1, Aug  1 2001, 23:36:34) 
[GCC 2.95.4 20010319 (Debian prerelease)] on linux2
Type "copyright", "credits" or "license" for more
information.
>>> import sys
>>> del sys.modules['__builtin__']
>>> int('1')
Segmentation fault

I don't have a copy of any of the 2.2 betas, so I
haven't tested it in those.  Apologies if this bug has
already been fixed.

I realise this is a silly thing to even try to do... I
was just wondering what would happen.  1.5.2 and 2.0.1
appear to be fine, incidentally.


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

>Comment By: Anthony Baxter (anthonybaxter)
Date: 2001-11-20 19:56

Message:
Logged In: YES 
user_id=29957

This is committed in version 2.85.2.1 of sysmodule.c
Thanks for the headsup.


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

Comment By: Martin v. Löwis (loewis)
Date: 2001-11-20 08:58

Message:
Logged In: YES 
user_id=21627

This is fixed in 2.2, which reports

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
RuntimeError: lost __builtin__

Assigning to Anthony for review as a 2.1.2 bugfix candidate;
the patch is in 2.90 of Python/sysmodule.c.

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

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