Package: opentoken
Severity: normal
Tags: patch
The symptom of this error is that signed integer tokens are not
always recognized as such; scanning may fail at the leading
'+' or '-' sign.
The error is in OpenToken.Recognizer.Integer.Analyze and is that
this procedure fails to assign any value to its "out" parameter
"Verdict" if The_Token.State is First_Char, Next_Char is '+' or '-',
and The_Token.Allow_Signs is True.
The result is that the analysis can work or fail depending on the
mostly random value that happens to be returned in this parameter.
On my earlier compiler (gnat 3.15p on Debian Sarge) it succeeded;
on my current compiler (gnat 4.3.2 on Debian Lenny) it fails.
The fix is to add an assignment to Verdict in this case:
case Next_Char is
when '-' | '+' =>
if The_Token.Allow_Signs then
Verdict := So_Far_So_Good; -- ADDED LINE
The_Token.State := First_Numeral;
else
The_Token.State := Done;
I do not (for historical and cross-platform reasons) use the
OpenToken library included with Debian. Instead, I compile from
the OpenToken sources (version 3.0b). I compared the Debian source
file to my sources and the bug seems to be present in Debian
OpenToken. However, the upstream maintainer (Stephen Leake) has
told me that he has also found and corrected this error, and that
the correction will be included in the next upstream release of
OpenToken.
-- System Information:
Debian Release: 5.0.2
APT prefers stable
APT policy: (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.26-2-686 (SMP w/1 CPU core)
Locale: lang=fi_fi.iso-8859...@euro, lc_ctype=fi_fi.iso-8859...@euro
(charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/bash
--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org