Opened 13 months ago

Closed 13 months ago

Last modified 13 months ago

#5635 closed defect (fixed)

ST_Split with NaN coordinates and empty geometry causes crash or invalid memory alloc request size

Reported by: robe Owned by: robe
Priority: blocker Milestone: PostGIS 3.0.11
Component: postgis Version: master
Keywords: Cc:

Description (last modified by pramsey)

After I put in NaN coordinate tests in garden tester, the berries are crashing on this:

SELECT ST_Split(
  'LINESTRING Z (1 2 NaN,3 4 10,5 6 NaN)'::geometry,
  'MULTIPOINT(EMPTY,2 1,2 4, 4 5)'::geometry 
)

On windows testing with

POSTGIS="3.5.0dev 3.4.0rc1-819-ge433f1884" [EXTENSION] PGSQL="150" GEOS="3.12.2dev-CAPI-1.18.2" (compiled against GEOS 3.13.0) PROJ="8.2.1 NETWORK_ENABLED=OFF 

PostgreSQL 15.0 on x86_64-w64-mingw32, compiled by gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0, 64-bit

it doesn't crash but gives

ERROR:  invalid memory alloc request size 1073741824 

Change History (13)

comment:2 by robe, 13 months ago

Owner: changed from pramsey to robe

comment:3 by Regina Obe <lr@…>, 13 months ago

In 8f77e8a/git:

Prevent NaN and infinite coordinates
in input and blade geometries of ST_Split
References #5635 for PostGIS 3.5.0

comment:4 by pramsey, 13 months ago

Description: modified (diff)

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

In c5d91e6/git:

Prevent NaN and infinite coordinates
in input and blade geometries of ST_Split
References #5635 for PostGIS 3.5.0

3.0.11

Last edited 13 months ago by robe (previous) (diff)

comment:6 by Paul Ramsey <pramsey@…>, 13 months ago

In 190d92a/git:

Use WKB in NaN-based regression test, references #5635

comment:7 by Paul Ramsey <pramsey@…>, 13 months ago

In c41208a/git:

Prevent NaN and infinite coordinates
in input and blade geometries of ST_Split
References #5635 for PostGIS 3.5.0

for 3.1.11

Last edited 13 months ago by robe (previous) (diff)

comment:8 by Paul Ramsey <pramsey@…>, 13 months ago

In ac11e3b/git:

Use WKB in NaN-based regression test, references #5635

comment:9 by Paul Ramsey <pramsey@…>, 13 months ago

In b41fb7f/git:

Prevent NaN and infinite coordinates
in input and blade geometries of ST_Split
References #5635 for PostGIS 3.5.0

for 3.2.7

Last edited 13 months ago by robe (previous) (diff)

comment:10 by Paul Ramsey <pramsey@…>, 13 months ago

In 41b7674/git:

Prevent NaN and infinite coordinates
in input and blade geometries of ST_Split
References #5635 for PostGIS 3.5.0

for 3.3.6

Last edited 13 months ago by robe (previous) (diff)

comment:11 by Paul Ramsey <pramsey@…>, 13 months ago

In 57ce3c9/git:

Prevent NaN and infinite coordinates
in input and blade geometries of ST_Split
References #5635 for PostGIS 3.5.0

3.4.2

Last edited 13 months ago by robe (previous) (diff)

comment:12 by pramsey, 13 months ago

Resolution: fixed
Status: newclosed

comment:13 by pramsey, 13 months ago

Version: 3.4.xmaster
Note: See TracTickets for help on using tickets.