Unit DWSRTTIExposer.pas, method:
class function TdwsRTTIInvoker.ValueFromIInfo(asType : TRttiType; const info :
IInfo) : TValue;
[...]
begin
case asType.TypeKind of
tkInteger, tkInt64 :
Result:=TValue.From<Int64>(info.ValueAsInteger);
tkFloat :
Result:=TValue.From<Double>(info.ValueAsFloat);
tkChar, tkString, tkUString, tkWChar, tkLString, tkWString :
Result:=TValue.From<String>(info.ValueAsString);
tkVariant :
Result:=TValue.From<Variant>(info.Value);
tkRecord :
Result:=ValueFromRecord(asType, info);
tkEnumeration :
if asType.Handle=TypeInfo(Boolean) then
Result:=info.ValueAsBoolean
else Result:=info.ValueAsInteger;
tkDynArray: begin
[...]
end
else
Result:=ValueFromIInfo(asType, info);//<-- infinite loop with tkMethod
Result:=TValue.Empty;
Assert(False);
end;
end;
If executing enter to this method with asType.TypeKind = tkMethod it starts an
recursion loop and finally cause stack overflow.
Original issue reported on code.google.com by jac....@gmail.com on 15 May 2013 at 9:19
Original issue reported on code.google.com by
jac....@gmail.com
on 15 May 2013 at 9:19