Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#4071 closed defect (fixed)

ST_ClusterKMeans segfault

Reported by: komzpa Owned by: komzpa
Priority: high Milestone: PostGIS 2.4.5
Component: postgis Version: 2.3.x
Keywords: Cc:

Description

reportedly segfaults on 2.5.0dev r16485, 2.4.3 r16312, 2.3.3 r15473, 2.4.4 r16526

select
  ST_ClusterKMeans(geom, 1) over (),
  ST_ClusterKMeans(geom, 2) over (),
  ST_ClusterKMeans(geom, 3) over ()
from (values (null::geometry), ('POINT(1 1)'), ('POINT EMPTY'), ('POINT(0 0)'), ('POINT(4 4)')) as g (geom);

Change History (3)

comment:1 by komzpa, 7 years ago

Resolution: fixed
Status: assignedclosed

In 16548:

ST_ClusterKMeans k=2 is now faster and converges better.

This discovered and fixes issue in NULL handling.

Closes #4071
Closes https://github.com/postgis/postgis/pull/238

comment:2 by komzpa, 7 years ago

In 16549:

ST_ClusterKMeans crash on NULL and EMPTY

Closes #4071

comment:3 by komzpa, 7 years ago

In 16550:

ST_ClusterKMeans crash on NULL and EMPTY

Closes #4071

Note: See TracTickets for help on using tickets.