8552 ZFS LUA code uses floating point math
illumos/illumos-gate@916c8d8811
916c8d8811
https://www.illumos.org/issues/8552
In the LUA interpreter used by "zfs program", the lua format() function
accidentally includes support for '%f' and friends, which can cause compilation
problems when building on platforms that don't support floating-point math in
the kernel (e.g. sparc). Support for '%f' friends (%f %e %E %g %G) should be
removed, since there's no way to supply a floating-point value anyway (all
numbers in ZFS LUA are int64_t's).
Reviewed by: Yuri Pankov <yuripv@gmx.com>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
Approved by: Dan McDonald <danmcd@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>
This commit is contained in:
parent
dd976ed5e4
commit
46077ff497
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/vendor-sys/illumos/dist/; revision=323533
@ -958,6 +958,7 @@ static int str_format (lua_State *L) {
|
||||
nb = str_sprintf(buff, form, ni);
|
||||
break;
|
||||
}
|
||||
#if defined(LUA_USE_FLOAT_FORMATS)
|
||||
case 'e': case 'E': case 'f':
|
||||
#if defined(LUA_USE_AFORMAT)
|
||||
case 'a': case 'A':
|
||||
@ -967,6 +968,7 @@ static int str_format (lua_State *L) {
|
||||
nb = str_sprintf(buff, form, (LUA_FLTFRM_T)luaL_checknumber(L, arg));
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
case 'q': {
|
||||
addquoted(L, &b, arg);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user