[Gdal-dev] Methods in the bindings that can easily create a segfault

Frank Warmerdam warmerdam at pobox.com
Sun Apr 29 13:01:13 EDT 2007


Ari Jolma wrote:
> I've previously added a bunch of tests into the bindings. I wonder if I 
> should do the same with these, or should I try to create typemaps that 
> catch NULL parameters.
> 
> I consider these serious problems since I believe Perl code should never 
> cause a segfault. I have an graphical application, where any user can 
> type in any Perl code. It is just not acceptable that such application 
> segfaults.

Ari,

I'd be happy to have NULL checking, but I think the swig bindings is the
wrong place for it. I believe it should be done in the C API functions
instead.  My preference would be for you to backout any changes you have
made like:

   http://trac.osgeo.org/gdal/changeset/11367

And we instead do this comprehensively in the C API.  I'd be willing to
queue this up as a job for Matuesz in trunk (not 1.4 branch).

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list