16
3
I would like to see who can make Python have a fatal crash with the most creative code. This means that when the program runs, Windows for example, will take over and pop up with something like “IDLE has stopped working”, or Linux will do whatever Linux does when a program crashes.
Rules:
This must be made in Python 2.7 or above (So old bugs aren't exploited that have been fixed in future versions of Python).
The definition of "crash" is "make IDLE or Python exit in an unintended way." This does not mean "make IDLE or Python halt and give a traceback". This also means exit, sys.quit, abort etc are not valid answers. For example, this will not be accepted:
import sys try: print c # Crashes Here, as c is not defined. except NameError, SyntaxError: print "Oh No!" sys.exit()
Making Python stop responding is not accepted.
The code must be explained on what it does to crash. A link to a bug report is fine.
The most upvoted answer after 10 days wins! Begin!!
EDIT: May I make it clear that the objective is not to make Python just halt executing the program with a traceback. The objective is to make Python completely crash or stop working. This means that if this task is successfully accomplished, Windows would give this (I'm not crashing Word here, it's just an example of what should happen for a different program):
or this:
6I'm voting to close this question as off-topic because this question asks for malicious code. – AdmBorkBork – 2016-08-04T13:22:06.950
1The tag [tag:code-challenge] requires an objective winning criterion. I think most creative isn't objective enough... – Howard – 2014-02-27T19:16:06.700
Ok - Ill change it to as short as possible, like most other challenges.. Creative is quite ambiguous actually... – George – 2014-02-27T19:17:29.617
@GeorgeH If creative is what you were looking for, [tag:popularity-contest] works perfectly. I personally feel that this would be best as a popularity contest. In the future, you can run your question through the sandbox where these kinks can be worked out before posting.
– Justin – 2014-02-27T20:04:18.013And its a lot clearer this time too (Does this question have the most edits ever now!!) – George – 2014-02-27T21:58:30.370
2@People with High Rep, my
prnt
in the question is intentional. – George – 2014-03-01T01:11:42.897prnt
doesn't make Python crash, it makes it raise aSyntaxError
. So the comment in your example code is wrong. – David Z – 2014-03-01T06:08:48.050Fixed now. Fixed print and changed it to C – George – 2014-03-01T14:21:31.130