Bug #620

grdimage resampling can go outside region and SEGV

Added by Paul about 7 years ago. Updated about 7 years ago.

Status:ClosedStart date:2014-09-09
Priority:NormalDue date:
Assignee:Paul% Done:


Target version:Candidate for next bugfix release
Affected version:all Platform:


This refers back to forum message http://gmt.soest.hawaii.edu/boards/1/topics/874?r=886#message-886. The BCR 2-D interpolation machinery had some slop so that points really close (<1e-4) to the boundary (but still outside) would be considered close enough to be inside. However, this also meant that we might access nodes outside the padded array; apparently this depended a bit on rounding errors which were different on different architectures. Also, some platforms (e.g., OS X) were more forgiving than others in reporting the access violation. I have modified this section to allow points slightly outside but reset their coordinates to lie exactly on the boundary. This prevents the access violation. The problem affected both GMT4 and 5. Fixed in GMT 4 (r10263) and GMT 5 (r13513).


#1 Updated by Paul about 7 years ago

  • Status changed from Resolved to Closed

Closing this as fixed.

Also available in: Atom PDF