[geos-devel] Re: [GEOS] #518: GEOS 3.3.2 crashes on MinGW64

GEOS geos-trac at osgeo.org
Tue Mar 27 08:45:04 EDT 2012


#518: GEOS 3.3.2 crashes on MinGW64
------------------------+---------------------------------------------------
 Reporter:  esseffe     |       Owner:  geos-devel@…              
     Type:  defect      |      Status:  new                       
 Priority:  major       |   Milestone:  3.3.3                     
Component:  Default     |     Version:  3.3.2                     
 Severity:  Unassigned  |    Keywords:                            
------------------------+---------------------------------------------------

Comment(by esseffe):

 interesting to notice (and may be related to this ticket someway).
 the Windows own runtime (printf) represents NaN-values in a completely
 different way ("1.#QNAN", "-1.#INF") from the one adopted on linux
 ("nan").
 please see: http://trac.osgeo.org/gdal/ticket/3576

 that's not only: I noticed an odd inconsistency affecting some math
 C-APIs between 32 and 64 bit implementations on Win, e.g.:

 {{{
 MinGW32
 -------------------------
 p = pow(0, -3.6)
 errno=34 [ERANGE, exactly as on Linux]
 fpclassify(p)=1280 [FP_INFINITE]
 }}}


 {{{
 MinGW64
 -------------------------
 p = pow(0, -3.6)
 errno=0 [no error !!!!!!]
 fpclassify(p)=1280 [FP_INFINITE]
 }}}

 anyway fpclassify() isn't natively supported by the Windows own runtime;
 it looks much more consistent and robust relying on win-specific
 _spclass()
 instead (and useful to support MSVC as well, not only MinGW).

 bye Sandro

-- 
Ticket URL: <http://trac.osgeo.org/geos/ticket/518#comment:3>
GEOS <http://geos.refractions.net/>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).


More information about the geos-devel mailing list