Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!umd5!uvaarpa!mcnc!duke!jwg From: jwg@duke.cs.duke.edu (Jeffrey William Gillette) Newsgroups: comp.sys.ibm.pc Subject: When will Microsoft give us a *REAL WORLD* C Compiler Message-ID: <11622@duke.cs.duke.edu> Date: 21 Apr 88 01:03:02 GMT Organization: Humanities Computing Center, Duke University Lines: 47 Last year I was working on a large project with Microsoft C 4.0 in the large memory mode. Half-way through, I noticed that uninitialized global variables (the kind put in the BSS segment) were being mysteriously trashed at random intervals. A few weeks with CodeView, and I discovered that malloc() was allocating storage right over the top of uninitialized globals! A tar to Microsoft (then I had access to Dial) brought the answer that (I paraphrase), "We know there is a problem with uninitialized globals, others have told us of the problem, we will fix it with the next version of MS C." This year I am working on a smaller project for an independent client. I develop a program using the large memory model and MS C 5.0. All of a sudden, some uninitialized globals start being trashed at random intervals. I reach (by instinct) for CodeView, set a few watchpoints, and discover (surprise, surprise) that malloc() is allocating storage right over the top of uninitialized global variables! Probably a dozen UseNet aces have already pointed up the same problem. And, this may not be a problem for programs tht keep all their data in the DGROUP segment (I haven't done much with uninitialized data in small or medium models). My question is simply, when is Microsoft going to get the message that real world programmers don't use the small memory model all the time. Sure the medium model (a la Quick C) provides for far code and near data - give me a break! The opposite would have been much more useful! Now I no longer have access to Dial, and can no longer get the "official" Microsoft position on such subjects. Anyone want to venture a guess as to when Microsoft will get on the ball and give us a *REAL WORLD* C compiler that handles both initialized (DGROUP) and uninitialized (BSS) global data in a large data memory model? Until then, my perception is that one uses uninitialized global structures (in large data models) at one's own risk! Jeffrey William Gillette Jeffrey William Gillette uucp: jwg at duke.edu Duke University bitnet: DYBBUK at TUCCVM -- Jeffrey William Gillette uucp: jwg at duke.edu Duke University bitnet: DYBBUK at TUCCVM