Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#9747 closed (fixed)

Explicitly set the response type of GEOS C functions that return strings to fix unpredictable behavior on 64-bit systems

Reported by: jbronn Owned by: jbronn
Component: GIS Version: 1.0
Severity: Keywords: gis geos segfault 64 c_char_p restype errcheck
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

See the following Google Group threads:

GeoDjango in Ubuntu 8.10, Segmentation Fault (django-users)

Segfault under modwsgi but not shell (modwsgi)

Attached is a backported patch from my gis-geos mercurial repo for my minor refactor of the GEOS interface.

Attachments (1)

geos_explicit_char_restype.diff (1.9 KB) - added by jbronn 7 years ago.
Uses a subclass of c_char_p for the response type.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 7 years ago by jbronn

  • Cc gis geos segfault 64 c_char_p restype errcheck removed
  • Keywords gis geos segfault 64 c_char_p restype errcheck added
  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to jbronn
  • Patch needs improvement unset
  • Status changed from new to assigned

Changed 7 years ago by jbronn

Uses a subclass of c_char_p for the response type.

comment:2 Changed 7 years ago by jbronn

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [9605]) Fixed #9747 -- now explicitly set response type on C functions that return WKB and WKT.

comment:3 Changed 7 years ago by jbronn

(In [9606]) [1.0.X] Fixed #9747 -- now explicitly set response type on C functions that return WKB and WKT.

Backport of r9605 from trunk.

comment:4 Changed 6 years ago by jbronn

(In [11205]) Fixed GEOS & GDAL C function prototypes to explicitly use a subclass of c_char_p as the return type on routines that return strings. This prevents crashes on some 64-bit platforms, like FreeBSD. Thanks to wilsaj for discovering the problem. Refs #9747.

comment:5 Changed 6 years ago by jbronn

(In [11206]) [1.0.X] ixed GEOS & GDAL C function prototypes to explicitly use a subclass of c_char_p as the return type on routines that return strings. This prevents crashes on some 64-bit platforms, like FreeBSD. Thanks to wilsaj for discovering the problem. Refs #9747.

Backport of r11205 from trunk.

Note: See TracTickets for help on using tickets.
Back to Top