Project

General

Profile

Actions

Bug #13104

closed

zfs: offset_t is signed and can not be > MAXOFFSET_T

Added by Toomas Soome 11 months ago. Updated 11 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
zfs - Zettabyte File System
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

Build error with smatch:

    /code/illumos-gate/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/i386/smatch: ../../common/fs/zfs/zfs_vnops.c:4844 zfs_seek() warn: impossible condition '(*noffp > 9223372036854775807) => (s64min - s64max > s64max)'

offset_t is signed type, therefore '*noffp' can be < 0, but not larger than MAXOFFSET_T, which is maximum positive value for offset_t.

Testing done: disasm does show identical assembler code before and after the patch.
Testing done: build/install/boot

Actions #1

Updated by Electric Monk 11 months ago

  • Gerrit CR set to 888
Actions #2

Updated by Toomas Soome 11 months ago

  • Description updated (diff)
Actions #3

Updated by Toomas Soome 11 months ago

  • Description updated (diff)
Actions #4

Updated by Electric Monk 11 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit e4af2f17fac5babc25d094f1bf22dd06515f66c7

commit  e4af2f17fac5babc25d094f1bf22dd06515f66c7
Author: Toomas Soome <tsoome@me.com>
Date:   2020-09-08T05:46:27.000Z

    13104 zfs: offset_t is signed and can not be > MAXOFFSET_T
    Reviewed by: Robert Mustacchi <rm@fingolfin.org>
    Reviewed by: Igor Kozhukhov <igor@dilos.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF