﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
32600	GEOS Polygons and Collections (across versions) cause segmentation faults on macOS arm64 (M1)	Aapo Rista	Brenton Partridge	"I got new Macbook Air (M1, 2020) and when I'm trying to use a project transferred from previous Intel Macbook Pro, I get Segmentation fault 11 in functions that use MultiPoint, MultiLinestring or MultiPolygon.

How to reproduce:

Create a virtualenv, a Django project and start the shell:

{{{
cd /tmp/ && python3 -m venv venv multisegfault && source multisegfault/bin/activate && pip install django && django-admin startproject segfaulttest && cd segfaulttest && python manage.py shell
}}}

Copy paste this line to the shell:

{{{
from django.contrib.gis.geos import MultiLineString; MultiLineString()
}}}

You should get **Segmentation fault: 11**.

It may be possible that **GEOSGeom_createCollection_r** causes crash, but I don't know how to try it outside Django.

Libraries are installed using HomeBrew and they have versions:

Django 3.2rc1 and 3.1.7

$ gdal-config --version
3.2.2

$ geos-config --version
3.9.1

$ python -V
Python 3.9.2

# SELECT PostGIS_full_version();
POSTGIS=""3.1.1 aaf4c79"" [EXTENSION] PGSQL=""130"" GEOS=""3.9.1-CAPI-1.14.2"" PROJ=""7.2.1"" LIBXML=""2.9.10"" LIBJSON=""0.15"" LIBPROTOBUF=""1.3.3"" WAGYU=""0.5.0 (Internal)""

Everything is good on Intel Macbook Pro (same library versions) and on Ubuntu 20.04 (default versions).
"	Bug	closed	GIS	4.0	Release blocker	fixed	Polygon, MultiPoint, MultiLineString, MultiPolygon, Segmentation fault, GIS, GeoDjango, GEOS, macOS, M1, arm64	Brenton Partridge	Ready for checkin	1	0	0	0	0	0
