Crash bug - with fix

Frank Warmerdam warmerdam at POBOX.COM
Thu Sep 15 16:16:56 EDT 2005

On 9/15/05, Ned Harding <nharding at> wrote:
> freeFeatureList (mapfile.c) frees a list recursively, so if you have a lot
> of things on the list it causes a stack fault.  This happens (on my machine)
> with a line layer with overlays with about 4000 objects.  It should be
> changed to free in a loop so that it doesn't blow out the stack.  The old
> code and new fixed code is below.  Can someone review it and check it in to
> CVS for me?  Note my loop does change the order of freeing from last->first
> to first->last.  It doesn't appear to matter in this situation. 


I have applied the patch in 4.7.  If you think it is critical enough to 
go into 4.6.2 (should such a thing be released) then let me know.

Best regards,
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at
light and sound - activate the windows |
and watch the world go round - Rush    | Geospatial Programmer for Rent

More information about the mapserver-dev mailing list