473,546 Members | 2,244 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to crash Python in 1 easy step (python 2.2.2)

I'm not sure if this is a python bug or a bug in an associated
library, and I'm not even sure how to correctly report it, but here is
Anytime python is accepting keyboard input, whether it's with
raw_input, or sitting on the command line waiting for the user to type
code, you can crash python by holding ctrl+shift and then pressing
enter.

This is on a RedHat 9.0 system running on an Athlon 600. Basically
everything about the system is standard except for what's been updated
by RedHat itself. If anyone who has the time and ability to track
down this bug needs more information, please email me.
Jul 18 '05 #1
10 3287
Paul Miller wrote:
I'm not sure if this is a python bug or a bug in an associated
library, and I'm not even sure how to correctly report it, but here is
Anytime python is accepting keyboard input, whether it's with
raw_input, or sitting on the command line waiting for the user to type
code, you can crash python by holding ctrl+shift and then pressing
enter.

This is on a RedHat 9.0 system running on an Athlon 600. Basically
everything about the system is standard except for what's been updated
by RedHat itself. If anyone who has the time and ability to track
down this bug needs more information, please email me.


I doubt it is a problem in Python, it works nicely on both my
windows and my linux machines (python 2.2.3).

Just a gut feeling: reinstall/upgrade your readline library.....

--Irmen

Jul 18 '05 #2
Paul Miller wrote:
I'm not sure if this is a python bug or a bug in an associated
library, and I'm not even sure how to correctly report it, but here is
Anytime python is accepting keyboard input, whether it's with
raw_input, or sitting on the command line waiting for the user to type
code, you can crash python by holding ctrl+shift and then pressing
enter.

This is on a RedHat 9.0 system running on an Athlon 600. Basically
everything about the system is standard except for what's been updated
by RedHat itself. If anyone who has the time and ability to track
down this bug needs more information, please email me.


No problem here with Python 2.2.x
(where x = cantRememberAnd ToLazyToCheckBu tThinkIts1)

Bruno

Jul 18 '05 #3
On Sun, Jul 13, 2003 at 10:44:41AM -0700, Paul Miller wrote:
I'm not sure if this is a python bug or a bug in an associated
library, and I'm not even sure how to correctly report it, but here is


Doesn't happen here. What terminal (xterm, kterm, gnome-terminal,
console?) and what LANG is set in your environment?

If you run 'od -c' at the shell, then hit ctrl-shift-enter then ctrl-d,
what does it show? I'd expect to see something very much like this:
$ od -c

0000000 \n
0000001
that is, even with the modifier keys, the program only sees a normal
newline character.

What happens if you type ctrl-shift-enter to another readline-linked
program (for instance 'bc', an infix calculator)? Do you get the same
crash?

Does the behavior change if you run 'cat | python' and then press
ctrl-shift-enter? This will avoid importing readline (and another
side-effect is to suppress the normal ">>>" prompt of the interative
interpreter)

Jeff

Jul 18 '05 #4
On Sun, 2003-07-13 at 10:44, Paul Miller wrote:
I'm not sure if this is a python bug or a bug in an associated
library, and I'm not even sure how to correctly report it, but here is
Anytime python is accepting keyboard input, whether it's with
raw_input, or sitting on the command line waiting for the user to type
code, you can crash python by holding ctrl+shift and then pressing
enter.

This is on a RedHat 9.0 system running on an Athlon 600.


Redhat 9, Athlon XP 1700+. Python 2.2.2-26, readline 4.3-5

Not a problem.

Regards,
Cliff

--
There's no light at the end of it all, let's all sit down and cry
-This Mortal Coil
Jul 18 '05 #5
On 13 Jul 2003 10:44:41 -0700, Paul Miller wrote:
Anytime python is accepting keyboard input, whether it's with
raw_input, or sitting on the command line waiting for the user to type
code, you can crash python by holding ctrl+shift and then pressing
enter.


Is this in an xterm, in some other terminal emulator, in a console
session? I'm guessing you'll see different behaviour if you try all
three of those, which will help narrow down the problem.

Not that a segfault (assuming that's what you mean by "crash") isn't a
bug -- any event that doesn't make the system hardware unreliable should
be handled without a segfault.

--
\ "One time a cop pulled me over for running a stop sign. He |
`\ said, 'Didn't you see the stop sign?' I said, 'Yeah, but I |
_o__) don't believe everything I read.'" -- Steven Wright |
http://bignose.squidly.org/ 9CFE12B0 791A4267 887F520C B7AC2E51 BD41714B
Jul 18 '05 #6
pw*******@adelp hia.net (Paul Miller) wrote in message news:<2e******* *************** ****@posting.go ogle.com>...
I'm not sure if this is a python bug or a bug in an associated
library, and I'm not even sure how to correctly report it, but here is
Anytime python is accepting keyboard input, whether it's with
raw_input, or sitting on the command line waiting for the user to type
code, you can crash python by holding ctrl+shift and then pressing
enter.

This is on a RedHat 9.0 system running on an Athlon 600. Basically
everything about the system is standard except for what's been updated
by RedHat itself. If anyone who has the time and ability to track
down this bug needs more information, please email me.


I'm seeing the same effect on RH9, using KDE's "konsole" terminal
emulator.
When pressing Ctrl-Shift-Enter, it actually sends the ^[OM characters
(Escape, O, M).
Manually sending the key sequence Esc-O-something also crashes Python.

Why this happens is still a good question...
Jul 18 '05 #7
Paul Miller enlightened us with:
Anytime python is accepting keyboard input, whether it's with
raw_input, or sitting on the command line waiting for the user to type
code, you can crash python by holding ctrl+shift and then pressing
enter.


sybren@sybren:s ybren$ python
Python 2.2.3+ (#1, Jul 5 2003, 11:04:18)
[GCC 3.3.1 20030626 (Debian prerelease)] on linux2
Type "help", "copyright" , "credits" or "license" for more information.
import sys
sys.stdin.readl ine()
'\n'


As you can see, my python handles it just fine. I'm running Debian
Unstable on my box. Guess it isn't so unstable after all ;-) I started
python from an xterm managed by Fluxbox.

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
Jul 18 '05 #8
ga*****@yahoo.c om (Gavrie Philipson) writes:
pw*******@adelp hia.net (Paul Miller) wrote in message news:<2e******* *************** ****@posting.go ogle.com>...
I'm not sure if this is a python bug or a bug in an associated
library, and I'm not even sure how to correctly report it, but here is
Anytime python is accepting keyboard input, whether it's with
raw_input, or sitting on the command line waiting for the user to type
code, you can crash python by holding ctrl+shift and then pressing
enter.

This is on a RedHat 9.0 system running on an Athlon 600. Basically
everything about the system is standard except for what's been updated
by RedHat itself. If anyone who has the time and ability to track
down this bug needs more information, please email me.


I'm seeing the same effect on RH9, using KDE's "konsole" terminal
emulator.
When pressing Ctrl-Shift-Enter, it actually sends the ^[OM characters
(Escape, O, M).
Manually sending the key sequence Esc-O-something also crashes Python.

Why this happens is still a good question...


This has almost surely got to be a readline problem. Does it happen
in (e.g.) gdb?

Cheers,
mwh

PS: pressing ctrl-\ also crashes Python...
PPS: unless you've been mucking with stty -- 'stty quit i' makes for
an abbreviated python programming experience :-)

--
well, take it from an old hand: the only reason it would be easier
to program in C is that you can't easily express complex problems
in C, so you don't. -- Erik Naggum, comp.lang.lisp
Jul 18 '05 #9
On Tue, 2003-07-15 at 03:17, Gavrie Philipson wrote:
pw*******@adelp hia.net (Paul Miller) wrote in message news:<2e******* *************** ****@posting.go ogle.com>...
I'm not sure if this is a python bug or a bug in an associated
library, and I'm not even sure how to correctly report it, but here is
Anytime python is accepting keyboard input, whether it's with
raw_input, or sitting on the command line waiting for the user to type
code, you can crash python by holding ctrl+shift and then pressing
enter.

This is on a RedHat 9.0 system running on an Athlon 600. Basically
everything about the system is standard except for what's been updated
by RedHat itself. If anyone who has the time and ability to track
down this bug needs more information, please email me.


I'm seeing the same effect on RH9, using KDE's "konsole" terminal
emulator.
When pressing Ctrl-Shift-Enter, it actually sends the ^[OM characters
(Escape, O, M).
Manually sending the key sequence Esc-O-something also crashes Python.


Yep, here (RH9, Py2.2.2) it is as well under gnome-terminal (sending
Esc-O-M). I'm amazed no one saw it sooner <wink>.

--
Cliff Wells, Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 (800) 735-0555
Jul 18 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

38
3702
by: kbass | last post by:
In different articles that I have read, persons have constantly eluded to the productivity gains of Python. One person stated that Python's productivity gain was 5 to 10 times over Java in some in some cases. The strange thing that I have noticed is that there were no examples of this productivity gain (i.e., projects, programs, etc.,...). ...
19
7146
by: Nicolas Pernetty | last post by:
Hello, I'm looking for any work/paper/ressource about continuous system simulation using Python or any similar object oriented languages (or even UML theory !). I'm aware of SimPy for discrete event simulation, but I haven't found any work about continuous system. I would like to develop a generic continous system simulator, and so...
30
2756
by: Stuart Turner | last post by:
Hi Everyone, I'm working hard trying to get Python 'accepted' in the organisation I work for. I'm making some good in-roads. One chap sent me the text below on his views of Python. I wondered if anyone from the group could give me some advice on how to respond / if they had been in a similar position. Any help appreciated, Thanks in...
72
5493
by: Gregory Petrosyan | last post by:
Please visit http://www.python.org/peps/pep-0204.html first. As you can see, PEP 204 was rejected, mostly because of not-so-obvious syntax. But IMO the idea behind this pep is very nice. So, maybe there's a reason to adopt slightly modified Haskell's syntax? Something like --> (1,3..10) --> same values as above, but return...
9
2446
by: badboybrown | last post by:
Hello, Is it possible to step through the "Create MDE" process and see what is causing Access to crash? I tried, unsuccessfully, many times to create an MDE from my database. But, randomly, I checked the "Allow Full Menus" in the Startup section. I was then able to create an MDE. That worked once. It has not worked since and I don't...
852
27958
by: Mark Tarver | last post by:
How do you compare Python to Lisp? What specific advantages do you think that one has over the other? Note I'm not a Python person and I have no axes to grind here. This is just a question for my general education. Mark
59
2480
by: Kevin Walzer | last post by:
From the introduction to PyObjC, the Python-Objective-C bridge on Mac OS X: "As described in Objective-C for PyObjC users the creation of Objective-C objects is a two-stage process. To initialize objects, first call a class method to allocate the memory (typically alloc), and then call an initializer (typically starts with init). Some...
0
3900
kaarthikeyapreyan
by: kaarthikeyapreyan | last post by:
Python an easy to program language becomes very powerful when they interact close with your system,for this purpose he gets friendly with this guy named C. Python establishes tightly bound wrappers with C ,so that it can extend the C APIs,and also get into closer relation with the system interface.Writing wrappers in python is achieved by using...
0
7507
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7435
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7698
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7947
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7794
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6030
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5080
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3472
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1046
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.