Opened 8 years ago

Closed 8 years ago

#209 closed defect (fixed)

Index fails on empty vector

Reported by: Maxim Reznik Owned by: somebody
Priority: major Milestone: 0.3.0
Component: Matreshka - League Version:
Keywords: Cc:

Description

with League.Strings;
with League.String_Vectors;

procedure Aaa is
   List : League.String_Vectors.Universal_String_Vector;
   X    : Natural;
begin
   X := List.Index (League.Strings.Empty_Universal_String);
end;

with "league";

project Aaa is

   for Main use ("aaa.adb");

end Aaa;


$ ./aaa

raised CONSTRAINT_ERROR : league-string_vectors.adb:188 access check failed

Change History (3)

comment:1 by vadim.godunko, 8 years ago

In [2821]:

Fix potential access to invalid address by Index subprogram when
Universal_String_Vector is empty.

Refs #209.

comment:2 by vadim.godunko, 8 years ago

In [2822]:

Add automated test.

Refs #209.

comment:3 by vadim.godunko, 8 years ago

Milestone: 0.3.0
Resolution: fixed
Status: newclosed

Bug was introduced by work for #188.

Note: See TracTickets for help on using tickets.