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 X-Received: by 10.157.68.164 with SMTP id v36mr1536240ote.95.1494798546966; Sun, 14 May 2017 14:49:06 -0700 (PDT) X-Received: by 10.157.14.91 with SMTP id n27mr59760otd.8.1494798546931; Sun, 14 May 2017 14:49:06 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!c26no1511065itd.0!news-out.google.com!m134ni611itb.0!nntp.google.com!c26no1511063itd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 14 May 2017 14:49:06 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=88.191.144.200; posting-account=T8VIJwoAAAA-IUorDdqOSpjmb16opbau NNTP-Posting-Host: 88.191.144.200 References: <1896933e-e985-420b-a4fe-9cca76af9976@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <395b3279-cd8e-4707-8fcc-b9c4f7ee0eff@googlegroups.com> Subject: Re: Weird Bug in Get_Line From: moy@adacore.com Injection-Date: Sun, 14 May 2017 21:49:06 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:46783 Date: 2017-05-14T14:49:06-07:00 List-Id: On Wednesday, April 26, 2017 at 10:44:07 PM UTC+2, Jeffrey R. Carter wrote: > What you've found is, as Wright pointed out, an error in GNAT's attempt t= o=20 > handle foreign files reasonably that has already been corrected, at least= in the=20 > Pro version. It has been fixed in early 2016 for the Pro version, and the fix was includ= ed in GNAT GPL 2016 issued last year. So 10 years later than the release da= te of GNAT 5.04 on which Brian reported the issue! > TBH, handling last lines without a line terminator as if they had a line= =20 > terminator is not easy. Much thought was needed to get PragmARC.Text_IO, = which=20 > handles Mac (CR), Unix (LF), and Windows (CR-LF) line terminators, to do = it. The sublety of the code was the reason we went through formal verification,= to make sure there were no more bugs in our implementation of Get_Line. An= d there were some. See the blog post Simon mentioned: http://blog.adacore.c= om/formal-verification-of-legacy-code