delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/17/21:20:20

From: Erik Max Francis <max AT alcyone DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Linux to DOS Problem
Date: Sun, 17 Aug 1997 13:00:18 -0700
Organization: Alcyone Systems
Lines: 22
Message-ID: <33F75852.2F3B1B64@alcyone.com>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 970810175343 DOT 4651X-100000 AT is> <Pine DOT SGI DOT 3 DOT 91 DOT 970812201412 DOT 27484A-100000 AT atmosp DOT physics DOT utoronto DOT ca>
NNTP-Posting-Host: newton.alcyone.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Peter Berdeklis wrote:

> The language definition specifies the value of uninitialized _auto_
> variables, but not of raw memory allocated by malloc or new.  This
> memory
> is undefined.  That's where the problem with v1.x and v2.0 came from.

Hmm; ANSI C 7.10.3.3 here says that the value of space returned by malloc
is "indeterminate."

Whether or not this is uninitialized or undefined or indeterminate,
clearly to be strictly conforming your program has to treat the value of
these entities as compeletely unreliable (i.e., always must be set before
use).

-- 
       Erik Max Francis, &tSftDotIotE / email / mailto:max AT alcyone DOT com
                     Alcyone Systems /   web / http://www.alcyone.com/max/
San Jose, California, United States /  icbm / 37 20 07 N  121 53 38 W
                                   \
   "Love is not love which alters / when it alteration finds."
                                 / William Shakespeare, _Sonnets_, 116

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019