Found the cause of the crash of the IDE on Solaris x86 when closing a
project: in procedure Search in TProject.UpdateUnitComponentDependencies
(ide/project.pp) some pointer arithmetic is used assuming TTypeData is
packed. This is not the case for solaris x86.
Snippet:
 
PropInfo:=PPropInfo(PByte(@TypeData^.UnitName)+Length(TypeData^.UnitName)+1)
;
      // read property count
      CurCount:=PWord(PropInfo)^;
      inc(PtrUInt(PropInfo),SizeOf(Word));
      
      // read properties
      while CurCount>0 do begin
        // point PropInfo to next propinfo record.
        // Located at Name[Length(Name)+1] !
        if (PropInfo^.PropType^.Kind=tkClass) then begin

Curcount is ok
PropInfo+SizeOf(Word) causes PropInfo^.PropType^.Kind to crash. It's 2 bytes
off.

Where should I report this bug? FPC or Lazarus. The latter I guess?

Ludo


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to