[fpc-devel] symify.pp broken
Tomas Hajny
XHajT03 at mbox.vol.cz
Thu Apr 17 19:37:12 CEST 2008
On Thu, April 17, 2008 14:45, Robert Riebisch wrote:
> Tomas Hajny wrote:
>
>> Fix committed (and it seems to work according to first test - fp.exe
>
> You introduced "ParagraphSize", but subtract immediate value "512" in
Ah, right, thanks for letting me know.
> line 369. And thanks for giving credits. ;-)
Just giving credits where they're due. ;-)
>> started in directory without configuration file indeed provides nice
>> backtrace on exit ;-) ).
>
> I see, you have found "my" problem. :-)
> Do you have any idea about that bug? I tracked the problem down to
> either procedure SetDefaultSwitches or writing OptimizingGoalSwitches to
> CfgFile, but have no clue.
I can't play with it now, but let me guess (all references below related
to fpswitch.pas):
1) Previously, there've been two options for OptimizingGoalSwitches, but
there's only one now (the other is not valid any longer) - line 1217.
2) SetDefaultSwitches calls OptimizingGoalSwitches^.SetCurrSel with index
_1_ (note that index is 0-based), i.e. referring to _second_ value, in
fact (there's no second value any longer, though - see above) - line 1438.
3) As opposed to SetBooleanItem, SetLongintItem or SetStringItem,
SetCurrSel unfortunately doesn't check if the selected index isn't beyond
the amount of items within the associated collection (using ItemCount
further referring to Items^.Count).
4) When writing the contents down, IDE tries accessing a non-existing
collection item. I really wonder how it comes that it doesn't bomb out on
other targets, I believe that it certainly should...
If you track it down (either confirming my assumption above or finding
some other reasons) and implement a good solution, a diff is the easiest
way for me (or other core team members) to apply your fix. The problem
probably exists for fixes branch too, so the fix should be eventually
merged there as well.
Tomas
More information about the fpc-devel
mailing list