[postgis-devel] segfault during regress

Sandro Santilli strk at keybit.net
Wed Jan 25 23:12:02 PST 2012


I had the same problem here (64bit).
Great to see there's a patch.
Forwarding to Frank Warmerdam as loader/shpopen.c comes from
his shapelib.

--strk;


On Wed, Jan 25, 2012 at 06:46:01PM -0500, Greg Troxel wrote:
> 
> I just updated and ran gmake check.  This time the loader/Latin1 test
> failed again, but it printed
> 
>   Unable to open loader/Latin1.shp or loader/Latin1.SHP.
>   Unable to open loader/Latin1.shx or loader/Latin1.SHX.
> 
> and then shp2pgsql segfaulted.  The problem was that it tried to close
> the file handle for the .shp when it couldn't open the .shx, but should
> have checked for NULL or aborted.  The following patch, surely not
> right, points out where the issue is.  (Rerunning with it got me back to
> the state where the string doesn't fit, which is a test harness issue
> that I still have not managed to addreses.)
> 
> Index: loader/shpopen.c
> ===================================================================
> --- loader/shpopen.c	(revision 8924)
> +++ loader/shpopen.c	(working copy)
> @@ -552,6 +552,9 @@
>                    pszBasename, pszBasename );
>          psHooks->Error( pszMessage );
>          free( pszMessage );
> +
> +	/* XXX free stuff */
> +	return( NULL );
>      }
>  
>      sprintf( pszFullname, "%s.shx", pszBasename );
> 
> 



> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel


-- 

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html



More information about the postgis-devel mailing list