x86 FPC trunk, Lazarus trunk:
I'm feeling fairly stupid, but... here goes:
I had code like this (dbf_dbffile in FPC trunk):
procedure TDbfFile.SetFieldData(Column: Integer; DataType: TFieldType;
Src, Dst: Pointer; NativeFormat: boolean);
...
var
...
Len: Integer;
Len := PWord(Src)^;
if Len > FieldSize then
Len := FieldSize;
I suspected Src could be an unassigned pointer and changed the code to
if Src = nil then
Len := 0
else
begin
Len := PWord(Src)^;
if Len > FieldSize then
Len := FieldSize;
end;
Running through the debugger, I break on the first line, if Src = nil.
The debugger shows Src is indeed nil, but when I try to step past, I get a SIGSEGV.
Any ideas?