From: alsaggaf@athena.mit.edu (M. Saggaf) Subject: Re: Kernel FP Math bug? Date: Sat, 9 Jan 1993 23:35:18 GMT
>>>>> On Sat, 09 Jan 1993 22:48:46 GMT, jliddle@rs6000.cmp.ilstu.edu (Jean Liddle) said:
JL> In article <1993Jan9.144510.9590@walter.cray.com> rsocia@alberti.cray.com (Rick Socia) writes:
>I compiled the following program:
>
>main(int argc, char *argv) { double f;
>
> f = atof(argv[1]);
> printf("The answere is %f\n", f);
>}
>
>The core dumps. (passing an argument of "0.50").
>
JL> I am running gcc 2.3.3 with all the new libs (gcc 486 binaries)
JL> and the new binutils, on an i486/33. I compiled the same program
JL> and also experienced the "core dump" problem.
JL> Also, my kernel is compiled without math emulation, if that helps
JL> in narrowing down the possibilities ...
Declare argv as *argv[] as it should be declared and the 'problem'
disappears. argv is not a pointer to a character, it's an array of
such pointers. The above program would bomb even on a Cray.
Cheers,
/Muhammad M. Saggaf | Stop the genocide
alsaggaf@athena.mit.edu | Save Bosnia