[Freeciv-Dev] Re: list cleaning
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Fri, 23 Jan 2004, Raimar Falke wrote:
> > > > > Can you please repeat the problems which the current code has?
> > > >
> > > > unit_list_iterate is unsafe
> > >
> > > Yes but I don't think it is a problem or bug. It is designed this way.
> >
> > It certainly causes bugs. One has to wonder if there are any unsafe
> > uses of it.
>
> Will such bugs show quickly? AFAIK the answer is yes. IMHO the
> cost/benefit ratio for a change is bad.
By experience, such bugs do _not_ show quickly (errors may depend on list
order and rare nested calls) and are not easy to track (random memory
corruption). I fixed umphteen bugs related to unit_list_iterate after the
allied transport patch and AI diplomacy went into cvs. Took quite a while
before all bugs (we know of) were found and fixed.
I also think it is a good thing in principle to add a *_free call whenever
we have a *_init call to a code module.
- Per
- [Freeciv-Dev] Re: list cleaning, Per I. Mathisen, 2004/01/23
- [Freeciv-Dev] Re: list cleaning, Raimar Falke, 2004/01/23
- [Freeciv-Dev] Re: list cleaning, Per I. Mathisen, 2004/01/23
- [Freeciv-Dev] Re: list cleaning, Raimar Falke, 2004/01/23
- [Freeciv-Dev] Re: list cleaning, Jason Short, 2004/01/23
- [Freeciv-Dev] Re: list cleaning, Raimar Falke, 2004/01/23
- [Freeciv-Dev] Re: list cleaning,
Per I. Mathisen <=
- [Freeciv-Dev] Re: list cleaning, Raimar Falke, 2004/01/26
- [Freeciv-Dev] Re: list cleaning, Per I. Mathisen, 2004/01/26
- [Freeciv-Dev] Re: list cleaning, Raimar Falke, 2004/01/27
- [Freeciv-Dev] Re: list cleaning, Per I. Mathisen, 2004/01/27
- [Freeciv-Dev] Re: list cleaning, Jason Short, 2004/01/27
- [Freeciv-Dev] Re: list cleaning, Per I. Mathisen, 2004/01/27
- [Freeciv-Dev] Re: list cleaning, Jason Short, 2004/01/27
- [Freeciv-Dev] Re: list cleaning, Raimar Falke, 2004/01/29
- [Freeciv-Dev] Re: list cleaning, Raimar Falke, 2004/01/29
- [Freeciv-Dev] Re: list cleaning, Jason Short, 2004/01/23
|
|