bin/116413: incorrect getconf(1) handling of unsigned constants
gives -1 for ULLONG_MAX
Ighighi
ighighi at gmail.com
Mon Sep 17 00:40:02 PDT 2007
>Number: 116413
>Category: bin
>Synopsis: incorrect getconf(1) handling of unsigned constants gives -1 for ULLONG_MAX
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Sep 17 07:40:01 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Ighighi
>Release: 6.2-STABLE
>Organization:
>Environment:
FreeBSD orion 6.2-STABLE FreeBSD 6.2-STABLE #0: Fri Sep 14 09:58:01 VET 2007 root at orion:/usr/obj/usr/src/sys/CUSTOM i386
>Description:
The code /usr/src/usr.bin/getconf/limits.gperf doesn't correctly handle unsigned constants.
Since it uses an intmax_t for all included variables, any value larger than INTMAX_MAX is printed incorrectly.
So, on my machine it prints -1 for ULLONG_MAX when it should print:
18446744073709551615 (defined in <machine/_limits.h> to be 0xffffffffffffffffULL)
if the desktop calculator isn't fooling me
>How-To-Repeat:
getconf ULLONG_MAX
>Fix:
I could submit a patch if there's a minimal guarantee that I won't lose my time...
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list