Bug #8552

ZFS LUA code uses floating point math

Added by Matthew Ahrens 4 months ago. Updated 4 months ago.

Status:ClosedStart date:2017-07-31
Priority:NormalDue date:
Assignee:Matthew Ahrens% Done:

100%

Category:zfs - Zettabyte File System
Target version:-
Difficulty:Medium Tags:needs-triage

Description

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).

History

#1 Updated by Electric Monk 4 months ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

git commit 916c8d881190bd2c3ca20d9fca919aecff504435

commit  916c8d881190bd2c3ca20d9fca919aecff504435
Author: Matthew Ahrens <mahrens@delphix.com>
Date:   2017-08-01T14:47:51.000Z

    8552 ZFS LUA code uses floating point math
    Reviewed by: Yuri Pankov <yuripv@gmx.com>
    Reviewed by: Igor Kozhukhov <igor@dilos.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom