- edited description
AV when adding TPair<string,string> to multimap
Issue #163
resolved
This code raises an AV
program MultimapAV;
{$APPTYPE CONSOLE}
uses
Generics.Collections,
Spring.Collections,
SysUtils;
procedure Main;
var
LMap: IMultiMap<string, Generics.Collections.TPair<string, string>>;
LValue: TPair<string, string>;
begin
LMap := TCollections.CreateMultiMap<string, TPair<string, string>>();
LValue := TPair<string, string>.Create('Hallo', 'Welt');
LMap.Add('Test', LValue);
end;
begin
try
Main;
except
on E: Exception do
Writeln(E.Message);
end;
Readln;
end.
It seems that the compiler is producing wrong code when passing the TPair to the internal IList in TMultiMapBase<TKey, TValue>.Add where it tries to pass it via stack instead of the address via register.
This can be reproduced on Delphi XE and Berlin
Comments (5)
-
reporter -
reporter - edited description
-
reporter - changed status to resolved
fixed issue
#163→ <<cset 31f9b1f407ee>>
-
reporter fixed issue
#163→ <<cset 31f9b1f407ee>>
-
reporter - changed version to 1.2
- Log in to comment