From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Introductory Ada Programming Book Date: Thu, 05 Jan 2017 08:38:02 +0000 Organization: A noiseless patient Spider Message-ID: References: <87r34j39u6.fsf@nightsong.com> <7643d59e-061f-42df-adda-9322608f127b@googlegroups.com> <5b52afcc-120e-41a5-bab2-7f5c6f647cc2@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="fcc7e7a00c26137e83268094fcf7486c"; logging-data="9583"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/sKIJF+7O7b98pltOF6fcdJsK14ngyumU=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (darwin) Cancel-Lock: sha1:MOEWgGCQpbaSmBKj8DBnaD7VOp8= sha1:c4PxOW8FNr42D21amDNRmwNmvfo= Xref: news.eternal-september.org comp.lang.ada:33065 Date: 2017-01-05T08:38:02+00:00 List-Id: "J-P. Rosen" writes: > A program that does not initialize a variable before using it has a > bug. If the program works because the compiler provided a default > value that happened to have an appropriate value, it's a buggy program > that works by chance. We had a program that was developed under Windows; when we transterred it to the VxWorks target, it fell in a tangled heap. This was because, on Windows, 'new' using the default storage pool returned zero-filled memory, while under VxWorks (5.3) the memory was uninitialized. We changed to a storage pool that filled allocated memory with 16#deadbeef#.