[postgis-devel] [postgis-tickets] r14592 - Patch from Sebastiaan Couwenberg to fix test_wkb_out_point failure on hppa & mips.

Regina Obe lr at pcorp.us
Tue Jan 12 22:45:07 PST 2016


Greg,

I committed to both trunk and branch 2.2.  I blindly trusted Sebastian's
judgement on things since it was just a regression test (not code change),
he had tested on platforms I have no access to,
and the tests still passed under my mingw64 install.  I'm not knowledgeable
enough in C to judge code.

Perhaps Paul , Sandro, or others can chime in on this.

Thanks,
Regina

-----Original Message-----
From: Greg Troxel [mailto:gdt at ir.bbn.com] 
Sent: Tuesday, January 12, 2016 7:44 PM
To: Regina Obe <lr at pcorp.us>
Cc: postgis-devel at lists.osgeo.org
Subject: Re: [postgis-tickets] r14592 - Patch from Sebastiaan Couwenberg to
fix test_wkb_out_point failure on hppa & mips.


Regina Obe <lr at pcorp.us> writes:

> Author: robe
> Date: 2016-01-12 16:36:35 -0800 (Tue, 12 Jan 2016) New Revision: 14592
>
> Modified:
>    branches/2.2/liblwgeom/cunit/cu_out_wkb.c
> Log:
> Patch from Sebastiaan Couwenberg to fix test_wkb_out_point failure on hppa
& mips.
> references #3426

I'm a little surprised at changes going onto the release branch without
first being on trunk and having review and then getting cherrypicked onto
the release branch.

> +/* parisc and mips (at least some processors) have a different nan 
> +representation from other arches. */ #if !defined(__hppa__) && 
> +!defined(__mips__) # define nan_val( v1, v2)  v1 #else # define 
> +nan_val( v1, v2)  v2 #endif

This seems quite awkward.  It would seem the tests should be grounded in the
standards (presumably postgis requires IEEE754 to start and doesn't work on
the vax :-).  Isn't there some way to start with a nan expressed as a
double, and then to convert that to a sql representation?  Or to write an
"isnan_wkb" function that takes the string/hex representation, extracts a
double, and then uses the C99-specified isnan(3) procedures.
Encoding of IEEE754 values into hex and having them in the tests seems
nonrobust, and it seems extra fragile to have switches by arch.





More information about the postgis-devel mailing list