public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/36785]  New: Segmentation fault in Gnat.Regexp
@ 2008-07-10 11:29 baldrick at gcc dot gnu dot org
  2008-08-03 12:08 ` [Bug ada/36785] " sam at gcc dot gnu dot org
  2009-02-17 13:36 ` baldrick at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: baldrick at gcc dot gnu dot org @ 2008-07-10 11:29 UTC (permalink / raw)
  To: gcc-bugs

$ gnatmake rtest.adb
gcc -c rtest.adb
gnatbind -x rtest.ali
gnatlink rtest.ali
$ ./rtest

raised STORAGE_ERROR : stack overflow (or erroneous memory access)

Also occurs with GNAT GPL 2008.

-- chop here --
with Gnat.Regexp;
procedure RTest is
   R : constant Gnat.Regexp.Regexp := Gnat.Regexp.Compile
     (Pattern => ".*AB.*|.*XYZ.*|.*0123456.*");
   B : Boolean;
begin
   B := Gnat.Regexp.Match("A", R);
end;


-- 
           Summary: Segmentation fault in Gnat.Regexp
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: baldrick at gcc dot gnu dot org
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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


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

* [Bug ada/36785] Segmentation fault in Gnat.Regexp
  2008-07-10 11:29 [Bug ada/36785] New: Segmentation fault in Gnat.Regexp baldrick at gcc dot gnu dot org
@ 2008-08-03 12:08 ` sam at gcc dot gnu dot org
  2009-02-17 13:36 ` baldrick at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: sam at gcc dot gnu dot org @ 2008-08-03 12:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from sam at gcc dot gnu dot org  2008-08-03 12:07 -------
Confirmed on 4.4.0 20080803 (i686-pc-linux-gnu).


-- 

sam at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sam at gcc dot gnu dot org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-08-03 12:07:22
               date|                            |


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


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

* [Bug ada/36785] Segmentation fault in Gnat.Regexp
  2008-07-10 11:29 [Bug ada/36785] New: Segmentation fault in Gnat.Regexp baldrick at gcc dot gnu dot org
  2008-08-03 12:08 ` [Bug ada/36785] " sam at gcc dot gnu dot org
@ 2009-02-17 13:36 ` baldrick at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: baldrick at gcc dot gnu dot org @ 2009-02-17 13:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from baldrick at gcc dot gnu dot org  2009-02-17 13:36 -------
If I unsupress checks in System.Regexp.Compile.Create_Secondary_Table,
then I get
  "raised CONSTRAINT_ERROR : s-regexp.adb:1161 index check failed"
here:

1160                for Column in 0 .. Alphabet_Size loop
1161                   Meta_States (Nb_State + 1) := (others => False); -- Here
1162                   Temp_State_Not_Null := False;

The reason is that Nb_State + 1 is beyond Meta_States'Last.


-- 


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


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

end of thread, other threads:[~2009-02-17 13:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-10 11:29 [Bug ada/36785] New: Segmentation fault in Gnat.Regexp baldrick at gcc dot gnu dot org
2008-08-03 12:08 ` [Bug ada/36785] " sam at gcc dot gnu dot org
2009-02-17 13:36 ` baldrick 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).