C bug causes double fault (actually double panic)
David Messer
dave at viper.Lynx.MN.Org
Wed Mar 22 17:03:31 AEST 1989
In article <9884 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:
>In article <244 at tree.UUCP> zarquon at tree.UUCP (Erin Filbert) writes:
{ Mention that this causes the system to crash deleted by Doug Gwyn }
>>main()
>>{
>> float x;
>> printf("x = %d", x);
>>}
>
>You'll undoubtedly get a flood of responses correctly pointing out
>that conversion of a double (promoted float) argument according to
>an int format is incorrect. Use %g or some such format specifier.
And you will probably get a flood of responses correctly pointing out
that what you say is irrelevent. The original message mentioned that
he "crashed the entire system" by running this program (calling it
a "double fault" rather than "double panic"; which may have misled you).
It doesn't matter that the C program has a bug, it still shouldn't
crash the operating system.
>The reason I'm posting this is so I can include a plea not to post
>questions like this to comp.unix.wizards.
A true wizard carefully reads the question so that he might answer the
question actually asked, rather than just say the first thing that comes
to mind.
> Thanks.
You are welcome.
--
This space | David Messer dave at Lynx.MN.Org -or-
for rent. | Lynx Data Systems ...!bungia!viper!dave
More information about the Comp.unix.microport
mailing list