Recent CVS segfaults, msautotest and python unit tests

Umberto Nicoletti umberto.nicoletti at GMAIL.COM
Wed Apr 25 08:09:02 EDT 2007


Hi all,
I have just committed a set of changes to solve the segfaults recently
reported by Steve and Tom.
The segfaults were mostly due to unchecked access to array items i.e.
styles because in the pre RFC24 days all possible layers, classes and
styles were allocated at startup, so as long as the index was lower
than MSMAXNUM* direct access and dereferencing was always possible.
With the help from the msautotest suite I have stomped all the
segfaults out and now I can run run the whole msautotest suite (gdal,
wxs and misc) without segfaults.

Now I am facing another problem: the msautotest suite reports a large
number of failures (results that don't match). Comparing each couple
of images (result and expected) doesn't help because the slight, but
well visible differences don't seem due to my modifications anyway.
Can someone with more knowledge of msautotest than I have shed some
light and confirm whether I am on the good track or not?

Last, but not least, running msautotest and the python unit tests is
not possible under python 2.5. To fix the former simply apply this
patch (4th argument to cmp is deprecated since python 2.3):

Index: mstestlib.py
===================================================================
RCS file: /data2/cvsroot/msautotest/pymod/mstestlib.py,v
retrieving revision 1.11
diff -r1.11 mstestlib.py
113c113
<     if filecmp.cmp(expected_file,result_file,0,1):
---
>     if filecmp.cmp(expected_file,result_file,0):
319a320,321
>           #print command
>

Thanks for your attention,
Umberto



More information about the mapserver-dev mailing list