You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This affects hts_expr and causes test/test_expr failures (e.g., for 16==0x10) as that uses hts_str2dbl() to parse integer hex constants. This is because hts_str2dbl() uses strtod() to parse hex constants like 0x10, and on Illumos,
In default mode for strtod(), only decimal, INF/INFINITY, and NAN/NAN(n-char-sequence) forms are recognized. In C99/SUSv3 mode, hexadecimal strings are also recognized.
So by default 0x10 returns 0.0 and leaves the trailing x10 unread.
Fortunately this problem is limited to Illumos. It can be worked around / solved by one of:
Ensuring C99/SUSv3 mode by configuring with CC=c99 or CC='cc -xc99'. (See xpg6.h for the gritty details.)
Reworking hts_str2dbl() to use a different standard library function (e.g. strtol()) to parse integer or hex constants.
Because the problem is limited to this platform only, and because workaround (1) is available (and can be automated in configure in future), there's probably no need to rework the code to avoid using strtod(). (So this issue can serve as information for any Illumos HTSlib users out there!)
The text was updated successfully, but these errors were encountered:
This affects
hts_expr
and causestest/test_expr
failures (e.g., for16==0x10
) as that useshts_str2dbl()
to parse integer hex constants. This is becausehts_str2dbl()
usesstrtod()
to parse hex constants like0x10
, and on Illumos,So by default
0x10
returns 0.0 and leaves the trailingx10
unread.Fortunately this problem is limited to Illumos. It can be worked around / solved by one of:
CC=c99
orCC='cc -xc99'
. (See xpg6.h for the gritty details.)hts_str2dbl()
to use a different standard library function (e.g.strtol()
) to parse integer or hex constants.Because the problem is limited to this platform only, and because workaround (1) is available (and can be automated in configure in future), there's probably no need to rework the code to avoid using
strtod()
. (So this issue can serve as information for any Illumos HTSlib users out there!)The text was updated successfully, but these errors were encountered: