Any clues to this!

Suman_Saraf (ssaraf@hss.hns.com)
Fri, 6 Feb 1998 14:33:43 +0530 (IST)


any clues to this ? I write a simple c program cd.c and do this :-

[suman@linux]Fri Feb 6 14:20:47 [~]:~$cat cd.c
main()
{
int *p=0x123454;
printf("%d",*p);
}

[suman@linux]Fri Feb 6 14:21:33 [~]:~$gcc -o cd cd.c
[suman@linux]Fri Feb 6 14:21:39 [~]:~$cd
[suman@linux]Fri Feb 6 14:21:41 [~]:~$gcc cd.c
[suman@linux]Fri Feb 6 14:21:46 [~]:~$a.out
Segmentation fault (core dumped)
[suman@linux]Fri Feb 6 14:21:47 [~]:~$file a.out
a.out: ELF 32-bit LSB executable i386 (386 and up) Version 1
[suman@linux]Fri Feb 6 14:22:35 [~]:~$file cd
cd: ELF 32-bit LSB executable i386 (386 and up) Version 1
[suman@linux]Fri Feb 6 14:22:39 [~]:~$ls -al cd a.out
-rwxrwxr-x 1 suman users 3937 Feb 6 14:21 a.out*
-rwxr-xr-x 1 suman users 3937 Feb 6 14:21 cd*
[suman@linux]Fri Feb 6 14:22:47 [~]:~$
[suman@linux]Fri Feb 6 14:24:45 [~]:~$gcc -v

gcc details :-

Reading specs from /usr/lib/gcc-lib/i486-linux/2.7.2/specs
gcc version 2.7.2

libc details:-

-rwxr-xr-x 1 root wheel 634880 Apr 29 1996 libc.so.4.7.6*
lrwxrwxrwx 1 root root 14 Nov 14 00:32 libc.so.5 ->
libc.so.5.3.12*

Why does this happen ? Core dump in one case due to bus error and no
error in one ??

--suman

I----------------------------------------------------------------------------I
I Suman Saraf http://oasis3.hss.hns.com/~suman. I
I Satellite Networking Division, PGP: finger suman@gabbar.svrec.ernet.in. I
I Thuraya-Mobilsat-OMC http://www.hughes-soft.com. I
I Hughes Software Systems,Plot 31, Sector 18 , Electronic City,Gurgaon. I
I Tel: 343703-08 Ext: 2423. I
I ---|-----------------------------------------------|-----------------------I
| panic("esp: Aiee penguin on the SCSI-bus."); |
| (from linux/drivers/scsi/esp.c) |
| ==============================================|

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu