Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!thumper!ulysses!allegra!princeton!udel!gatech!hao!noao!arizona!naucse!jdc From: jdc@naucse.UUCP Newsgroups: comp.os.vms Subject: Re: VAX C problems with VMS 4.6 Summary: C RTL free is different Message-ID: <565@naucse.UUCP> Date: 10 Feb 88 14:15:00 GMT References: <93*x_haraldsen@use.uio.uninett> Organization: Northern Arizona University, Flagstaff, AZ Lines: 23 Posted: Wed Feb 10 09:15:00 1988 In article <93*x_haraldsen@use.uio.uninett>, x_haraldsen%use.uio.uninett@TOR.NTA.NO (Tore Haraldsen USE/UiO) writes: > My old C utilities (among them lzcomp/dcmp are failing after we > installed VMS 4.6. > > I have traced the problems down to a sequence of > > malloc ... realloc ... free I had a similar problem with Todd Allen's MAKE program. I thought there was a problem with the run-time library, but it turned out that free was being called more than once on an old malloc pointer. As far as I know the old library routine had a "feature" that allowed free to be "harmless" if the block was previously deallocated. The new library seems to treat such cases prejudicially. My conclusion was that there really wasn't a "bug" in malloc/free, just a new behavior that turned up new run-time problems in code that needed fixing. If I'm wrong I'd like to hear about it. (I did get a fix for an ungetc problem in 4.6--fix is in 4.7). -- John Campbell ...!arizona!naucse!jdc unix? Sure send me a dozen, all different colors.