This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][Ada] PING valgrind shows ada/i-cobol.adb real bug


Laurent GUERBY wrote:
Ping. Ok to commit? Looks pretty safe to me.

Laurent

In fact this is in the GNAT sources now, so if you do nothing the patch will get there as soon as Arno catches up from the holidays :-)

But it is fine to commit it now if you like.

Here is the comment from the revision history in
our sources:

This is also GCC PR ada/19414
In PR ada/19414, it was noted that valgrind detected an error in the
Valid_Numeric routine when the item length was zero. In fact this was
probably not a bug that would cause trouble in practice, but it is
definitely cleaner to have an explicit check for the zero length case,
and to return False in this case. The test program k.adb:

with Interfaces.COBOL; use Interfaces.COBOL;
procedure K is
   type R is delta 0.01 Digits 10;
   package DC is new Decimal_Conversions (R);
   use DC;
begin
   if Valid ("", Unsigned) then
      raise Program_Error;
   end if;
end;

should not raise Program_Error and should not indicate a valgrind problem



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]