Opened 8 months ago

Last modified 7 months ago

#5635 closed defect

ST_Split with NaN coordinates and empty geometry causes crash or invalid memory alloc request size — at Version 4

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 (4)

comment:2 by robe, 8 months ago

Owner: changed from pramsey to robe

comment:3 by Regina Obe <lr@…>, 8 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, 7 months ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.