public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/33110]  New: Libgnat: No Constraint_Error on out-of-bounds array access in GNAT.Spitbol.Patterns
@ 2007-08-19  1:14 listor3 dot rombobeorn at tdcpost dot se
  2007-08-19  1:16 ` [Bug ada/33110] " listor3 dot rombobeorn at tdcpost dot se
  2007-10-14 12:24 ` charlet at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: listor3 dot rombobeorn at tdcpost dot se @ 2007-08-19  1:14 UTC (permalink / raw)
  To: gcc-bugs

This test program demonstrates the combined result of two problems with
Libgnat:

with Ada.Text_IO; use Ada.Text_IO;
with GNAT.Spitbol.Patterns; use GNAT.Spitbol.Patterns;

procedure Test_Spitbol_String_Slice is
   Str : String  := "12";
   P   : Pattern := Str(2 .. 2) & Arb;
begin
   Put_Line(Image(P));
   if Image(P)(2) = '2' then
      Put_Line("PASSED");
   else
      Put_Line("FAILED");
   end if;
end Test_Spitbol_String_Slice;

$ gnatmake test_spitbol_string_slice && ./test_spitbol_string_slice
gcc -c test_spitbol_string_slice.adb
gnatbind -x test_spitbol_string_slice.ali
gnatlink test_spitbol_string_slice.ali
'1' & Arb
FAILED

The first problem is in g-spipat.adb line 3434: "Str (1)" should be "Str
(Str'First)". The second problem is that no Constraint_Error is raised, because
GNAT.Spitbol.Patterns has been compiled with all checks suppressed (-gnatp),
which it apparently wasn't ready for.


-- 
           Summary: Libgnat: No Constraint_Error on out-of-bounds array
                    access in GNAT.Spitbol.Patterns
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: listor3 dot rombobeorn at tdcpost dot se
 GCC build triplet: i386-redhat-linux
  GCC host triplet: i386-redhat-linux
GCC target triplet: i386-redhat-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33110


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug ada/33110] Libgnat: No Constraint_Error on out-of-bounds array access in GNAT.Spitbol.Patterns
  2007-08-19  1:14 [Bug ada/33110] New: Libgnat: No Constraint_Error on out-of-bounds array access in GNAT.Spitbol.Patterns listor3 dot rombobeorn at tdcpost dot se
@ 2007-08-19  1:16 ` listor3 dot rombobeorn at tdcpost dot se
  2007-10-14 12:24 ` charlet at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: listor3 dot rombobeorn at tdcpost dot se @ 2007-08-19  1:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from listor3 dot rombobeorn at tdcpost dot se  2007-08-19 01:16 -------
Created an attachment (id=14075)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14075&action=view)
test case


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33110


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug ada/33110] Libgnat: No Constraint_Error on out-of-bounds array access in GNAT.Spitbol.Patterns
  2007-08-19  1:14 [Bug ada/33110] New: Libgnat: No Constraint_Error on out-of-bounds array access in GNAT.Spitbol.Patterns listor3 dot rombobeorn at tdcpost dot se
  2007-08-19  1:16 ` [Bug ada/33110] " listor3 dot rombobeorn at tdcpost dot se
@ 2007-10-14 12:24 ` charlet at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: charlet at gcc dot gnu dot org @ 2007-10-14 12:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from charlet at gcc dot gnu dot org  2007-10-14 12:24 -------
This is fixed in mainline.

Arno


-- 

charlet at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.3.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33110


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-10-14 12:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-19  1:14 [Bug ada/33110] New: Libgnat: No Constraint_Error on out-of-bounds array access in GNAT.Spitbol.Patterns listor3 dot rombobeorn at tdcpost dot se
2007-08-19  1:16 ` [Bug ada/33110] " listor3 dot rombobeorn at tdcpost dot se
2007-10-14 12:24 ` charlet at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).