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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,939bba6defed3e0d X-Google-Attributes: gid103376,public From: Florian Weimer Subject: Re: problem solved (and now I know why) Date: 2000/04/15 Message-ID: <87em87x16k.fsf@deneb.cygnus.argh.org>#1/1 X-Deja-AN: 611443905 References: <8d7n1a$ee6@journal.concentric.net> <38F790EE.2273B508@ensco.com> Mail-Copies-To: never Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@cygnus.argh.org X-Trace: deneb.cygnus.argh.org 955784387 500 192.168.1.2 (15 Apr 2000 07:39:47 GMT) Organization: Penguin on board User-Agent: Gnus/5.0804 (Gnus v5.8.4) Emacs/20.6 Mime-Version: 1.0 Reply-To: Florian Weimer NNTP-Posting-Date: 15 Apr 2000 07:39:47 GMT Newsgroups: comp.lang.ada Date: 2000-04-15T07:39:47+00:00 List-Id: Stephen Arnold writes: > However, one question remains: Why did windoze not catch this problem? > My original (and incorrect) code runs just fine on win95, win98, and > even NT4 (which my instructor uses). The original code passed his test > driver with flying colors, and he tests *everything* (including the > Overflow exception). Your program was erroneous, which means that anything could have happened. > Is there any way for GNAT to catch this at run-time, or is it completely > up to the OS? I guess I'll be sticking to Linux from now on... I think there are Windows libraries with a special version of malloc() which detects such errors. I don't know how to use them with GNAT, though.