Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > How to crash Python in 1 easy step (python 2.2.2)

Reply
Thread Tools

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

 
 
Paul Miller
Guest
Posts: n/a
 
      07-13-2003
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.
 
Reply With Quote
 
 
 
 
Irmen de Jong
Guest
Posts: n/a
 
      07-13-2003
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

 
Reply With Quote
 
 
 
 
Jeff Epler
Guest
Posts: n/a
 
      07-13-2003
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

 
Reply With Quote
 
Bruno Desthuilliers
Guest
Posts: n/a
 
      07-13-2003
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 = cantRememberAndToLazyToCheckButThinkIts1)

Bruno

 
Reply With Quote
 
Cliff Wells
Guest
Posts: n/a
 
      07-14-2003
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


 
Reply With Quote
 
Ben Finney
Guest
Posts: n/a
 
      07-14-2003
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
 
Reply With Quote
 
Gavrie Philipson
Guest
Posts: n/a
 
      07-15-2003
http://www.velocityreviews.com/forums/(E-Mail Removed) (Paul Miller) wrote in message news:<(E-Mail Removed). 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...
 
Reply With Quote
 
Sybren Stuvel
Guest
Posts: n/a
 
      07-15-2003
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:sybren$ python
Python 2.2.3+ (#1, Jul 5 2003, 11:04:1
[GCC 3.3.1 20030626 (Debian prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.stdin.readline()


'\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?
 
Reply With Quote
 
Michael Hudson
Guest
Posts: n/a
 
      07-15-2003
(E-Mail Removed) (Gavrie Philipson) writes:

> (E-Mail Removed) (Paul Miller) wrote in message news:<(E-Mail Removed). 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
 
Reply With Quote
 
Cliff Wells
Guest
Posts: n/a
 
      07-15-2003
On Tue, 2003-07-15 at 03:17, Gavrie Philipson wrote:
> (E-Mail Removed) (Paul Miller) wrote in message news:<(E-Mail Removed). 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
"Best" way to "drive" a Python program step by step. André Python 1 09-15-2008 01:50 AM
wanted: framework for creating nice step by step graphical visualisationsof running Python code Claudio Grondi Python 2 07-02-2006 11:55 PM
Step By Step Instructions Glenallan Wireless Networking 15 12-29-2004 12:13 AM
can somebody guide me through this step by step? Taquin Noel Wireless Networking 5 12-26-2004 01:31 AM



Advertisments