[postgis-users] Infinite loop in st_intersects - because of incorrect data out of st_transform?
magnus at hagander.net
Thu Mar 10 07:13:03 PST 2011
On Wed, Mar 9, 2011 at 16:46, Mark Cave-Ayland
<mark.cave-ayland at siriusit.co.uk> wrote:
> On 08/03/11 09:16, Magnus Hagander wrote:
>> Since nobody appears to be too interested in producing a quick fix in
>> geos, attached is a patch that puts in an *ugly* workaround in
>> PostGIS, that simply rejects the infinite values higher up in the
>> stack. I don't consider this a long-term fix, but it at least causes
>> an error instead of getting stuck in an infinite loop that can only be
>> terminated with kill -9... So pending a solution in geos, I would
>> suggest this workaround (or something better located written by
>> someone who actually know the postgis code better than me) be put in.
>> The way it is now, any application that allows the user to specify
>> input that could generate such a geometry could trivially
>> denial-of-service any postgis site...
> Hi Magnus,
> What was the discussion with the GEOS people like? Did they consider this to
> be a bug in GEOS or a bug in PostGIS?
Ugh. Re-reading the thread, I realize I've misunderstood this. I
thought both issues were "in the same way", but I see now once was
geos and one was proj. Thus, I expected your cross post in the
followup covered it :-) So given that, I haven't actually contacted
the geos community specifically - unless they are represented on this
Having said that, if you (or somebody else who actually knows the
PostGIS code well) would handle that contact, that would be great.
Given my lack of knowledge in the 10 or so stack frames between my
calling and the actual geos call, I fear I won't be able to answer
their follow-up questions in a good way :-)
> The basic workaround looks good, but I'd still be interested on Frank's
> thoughts re: whether infinity is a valid projection output point in order to
> determine the best place for the check.
Yeah.. I think there should still be some kind of check even if it's a
"never supposed to happen scenario", but it should definitely be in
the right place...
More information about the postgis-users