Opened 6 months ago

Closed 5 months ago

#5571 closed defect (fixed)

ST_GeneratePoints invalid memory alloc request

Reported by: mdavis Owned by: pramsey
Priority: medium Milestone: PostGIS 3.3.6
Component: postgis Version: 3.4.x
Keywords: Cc:

Description

This case of a very narrow vertical box:

SELECT  ST_GeneratePoints('POLYGON((36.75 35.230555555555554,36.75 35.233333333333334,36.75000000000002 35.233333333333334,36.75000000000002 35.230555555555554,36.75 35.230555555555554))',1);

produces:

ERROR:  invalid memory alloc request size 1433372880

Original report at: https://gis.stackexchange.com/questions/468426/st-generatepoint-returns-invalid-memory-alloc-request-size-4305734400

Change History (5)

comment:1 by robe, 5 months ago

Milestone: PostGIS 3.4.1PostGIS 3.3.6

Yap I see the same issue. i presume this has been around for some time so pushing to 3.3.6

comment:2 by Paul Ramsey <pramsey@…>, 5 months ago

In 2c9db60/git:

Fix ST_GeneratePoints invalid memory alloc request, references #5571

comment:3 by Paul Ramsey <pramsey@…>, 5 months ago

In 4db644f7/git:

Fix ST_GeneratePoints invalid memory alloc request, references #5571

comment:4 by Paul Ramsey <pramsey@…>, 5 months ago

In d8bbc4f/git:

Improve ST_GeneratePoints performance
for newer GEOS, and in general by
not testing grid squares that are outside of the shape.
Fix memory allocation issue for very narrow inputs.
References #5571

comment:5 by pramsey, 5 months ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.