[ python-Bugs-1226969 ] segfault in os module

SourceForge.net noreply at sourceforge.net
Sun Jun 26 01:15:09 CEST 2005


Bugs item #1226969, was opened at 2005-06-24 13:05
Message generated for change (Comment added) made by jacobo_es
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1226969&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: jacobo_es (jacobo_es)
Assigned to: Nobody/Anonymous (nobody)
Summary: segfault in os module

Initial Comment:
python crashes when a bad parameters are passed to execl function        
of the os module:        
>>> import os        
>>> os.execl("/bin/bash")        
Segmentation Fault (core dumped)        
        
No matter the platform (on ppc raises a bus error) and the version of      
C compiler,  always crashes, python versions used are 2.4.1 and    
2.4c1.      
      
Proved on MacOSX (ppc), and Knoppix, Red Hat  Enterprise   
and debian woody 3.0 (x86).   
  
However, on 2.2.3 version not crashes.  

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

>Comment By: jacobo_es (jacobo_es)
Date: 2005-06-25 23:15

Message:
Logged In: YES 
user_id=1302185

I tried this directly on the C layer, too, and not raises a
signal 11, segmentation fault, just the function execl()
isn't executed and the program flow goes, not raises a
sigsegv, and that's not happen in 
the same way in python, that abort the python interpreter
and dump a core file.

-( tmp )- ./p
execl not executed.
-( tmp )- cat p.c
#include <stdio.h>

int main() {
        execl("/bin/bash");
        fprintf(stderr, "execl not executed.\n");
        exit(-1);
}

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

Comment By: Reinhold Birkenfeld (birkenfeld)
Date: 2005-06-24 14:53

Message:
Logged In: YES 
user_id=1188172

This behaviour was introduced with the fixing of bug
#952953, where someone complained that he couldn't call
execl with only one argument.

I tried this directly on the C layer on Linux, and it
segfaults too.
Are there OSes where this is legal?

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

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


More information about the Python-bugs-list mailing list