#1825 closed defect (fixed)
containsproperly: Conditional jump or move depends on uninitialised value(s)
Reported by: | strk | Owned by: | pramsey |
---|---|---|---|
Priority: | high | Milestone: | PostGIS 1.5.5 |
Component: | postgis | Version: | 1.5.X |
Keywords: | Cc: |
Description
Running one of the tests in our regression suite under valgrind gives a conditional jump depending on uninitialized error:
The query:
SELECT c, ST_ContainsProperly(ply, pt) FROM ( VALUES ('containsproperly099', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(5 5)'), ('containsproperly103', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(0 5)'), ('containsproperly104', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(0 12)')) AS v(c,ply,pt);
Note that you _need_ 3 records in there, or the error doesn't show up.
Change History (6)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Code on line 336 is:
else if ( pg_geom1 && cache->argnum != 2 && cache->pg_geom1_size == pg_geom1_size && memcmp(cache->pg_geom1, pg_geom1, pg_geom1_size) == 0)
It is the memcmp being a problem, removing which there's no error anymore.
comment:6 by , 12 years ago
Milestone: | PostGIS 2.0.1 → PostGIS 1.5.5 |
---|---|
Version: | 2.0.x → 1.5.X |
Note:
See TracTickets
for help on using tickets.
Oh, and the valgrind error: