Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!hao!gatech!emory!platt From: platt@emory.uucp (Dan Platt) Newsgroups: comp.sys.ibm.pc Subject: Re: MicroSoft C Ver 5.0 BUG!! Message-ID: <2430@emory.uucp> Date: 30 Dec 87 03:53:45 GMT References: <2276@tekigm2.TEK.COM> <433@doug.UUCP> Reply-To: platt@emory.UUCP (Dan Platt) Distribution: na Organization: Emory University Lines: 40 In article <433@doug.UUCP> tim@doug.UUCP (Tim J Ihde) writes: >In article <2276@tekigm2.TEK.COM>, marks@tekigm2.TEK.COM (Mark D. Salzman) writes: >> A friend of mine just discovered a bug in Microsoft C Ver. 5.0 that >> crashes the "cl" compiler . . . [with a stack-overflow error message] >> >> double a,b = 3.0; >> main() >> { >> a = (b * 1.7E-9) + ((b * 1.9E-9) * 1.0E-4); /* <-- This crashes "cl" */ >> } >> - stack overflow > ... I don't suppose your friend would have exemod'ed cl and decreased >its allocated stack space? > > tim >-- >Tim J. Ihde ihnp4!ctsmain!doug!tim >(201) 535-9897 Actually, this error is: 1) in the compiler, 2) not caused by exemod'ing the cl (it's actually probably not in cl proper, but in one of the files spawned by cl), 3) only works in the above format. A form like a=b*2+b*3*4; will also crash. A form like a=b+b*3*4; won't, and neither will a=b*2+b*3; and a=2*b+3*4*b; won't crash. This seems to be restricted to the above form. My guess is that it tries to save multiplies by factoring and gets sick. Given what you (Tim) said about MS working on the bug you reported, I wonder if Microsoft will come out with an update sooner than they usually do (maybe a msc5.1 -- something they've refrained from doning in the past). Dan Platt