Bug 168419
Summary: | calling os.execl() with one argument crashes the interpreter | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Nalin Dahyabhai <nalin> |
Component: | python | Assignee: | Mihai Ibanescu <mihai.ibanescu> |
Status: | CLOSED NOTABUG | QA Contact: | Brock Organ <borgan> |
Severity: | low | Docs Contact: | |
Priority: | medium | ||
Version: | rawhide | CC: | katzj |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2005-10-03 17:34:58 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Nalin Dahyabhai
2005-09-15 20:46:57 UTC
This doesn't necessarily seem to be a problem in python's implementation of execl. Try to replace /bin/bash with /bin/ls. It works for me (/bin/bash segfaults for me too). strace -f shows the error being somewhere else, but can't really tell. I tried this: #include <stdio.h> #include <unistd.h> int main() { //char *const args[] = {"/bin/bash", NULL}; char *const args[] = {NULL}; execv(args[0], args); return 0; } This one works fine, even thogh, according to execv(3) the behaviour would be undefined (should vs. must): The execv and execvp functions provide an array of pointers to null-terminated strings that represent the argument list available to the new program. The first argument, by convention, should point to the file name associated with the file being executed. The array of pointers must be terminated by a NULL pointer. Needs more investigation. I agree. If I run this under strace, it's clear that the exec() succeeds, and that the crash is actually in the shell. I'm okay with closing this as invalid. +1 ==> NOTABUG |