endianess/signed issue on OpenBSD/sparc64 ?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

endianess/signed issue on OpenBSD/sparc64 ?

Landry Breuil
Hi (not subscribed to the list),

i'm more or less maintaining sqlite3 in OpenBSD packages (at 3.28.0
now), and recently proj.4 was updated to a version that relies on
sqlite3 to store projections, which has some constraints on values
entered.

this broke on sparc64 (cf https://github.com/OSGeo/PROJ/issues/1508),
because for some reason a float value gets converted to its opposite,
which show simply with (per
https://github.com/OSGeo/PROJ/issues/1508#issuecomment-500141325):

>select 298.2564151;
-298.2564151

of course, on OpenBSD/amd64 this simple sql statement works. So a bug in
sqlite itself ? I don't have access to a sparc64 system right now, but
i'd try previous sqlite versions to check for a regression.

Landry
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: endianess/signed issue on OpenBSD/sparc64 ?

Richard Hipp-3
On 6/9/19, Landry Breuil <[hidden email]> wrote:
>
> this broke on sparc64
>>select 298.2564151;
> -298.2564151
>

I cannot reproduce this (perhaps because I do not have access to a
sparc64 platform running OpenBSD) and do not have any good ideas about
what might be causing it.  If you can get me a temporary login on such
a system, however, I will debug it for you.  Send private email to the
address below.

--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: endianess/signed issue on OpenBSD/sparc64 ?

Jeremie Courreges-Anglas
On Thu, Jun 13 2019, Richard Hipp <[hidden email]> wrote:

> On 6/9/19, Landry Breuil <[hidden email]> wrote:
>>
>> this broke on sparc64
>>>select 298.2564151;
>> -298.2564151
>>
>
> I cannot reproduce this (perhaps because I do not have access to a
> sparc64 platform running OpenBSD) and do not have any good ideas about
> what might be causing it.  If you can get me a temporary login on such
> a system, however, I will debug it for you.  Send private email to the
> address below.
Thanks for the proposal, I have sent you a private mail.

For the record:

- I have built a bunch of older sqlite3 releases: 3.8.2, 3.16.2, 3.24.0,
3.25.1, 3.25.3 and 3.27.2.  All of them give the same wrong result for
"select 298.2564151;"

- on OpenBSD/sparc64 both the base system and sqlite3 are built using
gcc-4.2.1, an old gcc release licensed under GPLv2.  Using gcc-8.3.0 to
build sqlite3 doesn't magically fix the problem.

--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

signature.asc (847 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: endianess/signed issue on OpenBSD/sparc64 ?

Jeremie Courreges-Anglas
In reply to this post by Richard Hipp-3
On Thu, Jun 13 2019, Richard Hipp <[hidden email]> wrote:

> On 6/9/19, Landry Breuil <[hidden email]> wrote:
>>
>> this broke on sparc64
>>>select 298.2564151;
>> -298.2564151
>>
>
> I cannot reproduce this (perhaps because I do not have access to a
> sparc64 platform running OpenBSD) and do not have any good ideas about
> what might be causing it.  If you can get me a temporary login on such
> a system, however, I will debug it for you.  Send private email to the
> address below.
This was indeed not a bug in SQLite, but in a sparc64-specific part of
the OpenBSD libc, as pointed out privately by Richard.  I have committed
a fix (picked up from FreeBSD):

  https://marc.info/?l=openbsd-cvs&m=156113647005489&w=2

Richard, thanks a lot for your time and expertise.

--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

signature.asc (847 bytes) Download Attachment