Bug 62784 - SegFault in weird/bad places
Summary: SegFault in weird/bad places
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc
Version: 7.2
Hardware: i586
OS: Linux
high
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-04-05 16:24 UTC by Dan Egli
Modified: 2016-11-24 15:04 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-04-05 16:24:15 UTC
Embargoed:


Attachments (Terms of Use)

Description Dan Egli 2002-04-05 16:24:10 UTC
(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 11:04:44 UTC
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.