Bug 62784 - SegFault in weird/bad places
SegFault in weird/bad places
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
7.2
i586 Linux
high Severity high
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-04-05 11:24 EST by Dan Egli
Modified: 2005-10-31 17:00 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-04-05 11:24:15 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dan Egli 2002-04-05 11:24:10 EST
(I'm putting this as a glibc problem since it seems no one program/package is 
affected. Sounds like a bad glibc binary but I cannot be sure).

Description of Problem:
Segfaults for things that should NOT segfault (like running simple apps, 
upgrading rpms, ect...)

Version-Release number of selected component (if applicable):
2.2.4-13

How Reproducible:
100%

Steps to Reproduce:
(instance 1)
1. Create this in a .c file:
#include <stdio.h>
#include <crypt.h>

int main(int argc; char *argv)
{
printf("Before: %s:%s", argv[1], argv[2]);
printf("after: %s:%s", argv[1], crypt(argv[2], "a7"));
}

2. compile the program (gcc testprog.c -o testprog -lcrypt)
3. ./testprog abc abc

Actual Results:
Segmentation fault


Expected Results:
output:
Before: abc:abc
after: abc:<abc encrypted>

(instance 2):
Steps to Reproduce:
1. download latest MySql binary RPMs from mysql.com
2.rpm -U -vvh MySQL-3.23.49a-1.i386.rpm 

Results:
D: ============== MySQL-3.23.49a-1.i386.rpm
Segmentation fault

Expected Results:
The RPM should install.


Additional Information:
	
How Reproduceable:
100%
Comment 1 Jakub Jelinek 2002-04-08 07:04:44 EDT
Er, can you list a single reason why your above testcase should not segfault?
There are 2 bugs on one line:
int main(int argc; char *argv)
1) ; instead of ,
2) char * argv instead of char **argv resp. char *argv[]
Segfault is caused by 2).

Note You need to log in before you can comment on or make changes to this bug.