Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Feb 2013 12:10:01 GMT
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/175759: Correct data types for fields of struct qm_trace{} from <sys/queue.h>
Message-ID:  <201302051210.r15CA1Z6031841@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/175759; it has been noted by GNATS.

From: Gleb Smirnoff <glebius@FreeBSD.org>
To: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
Cc: Bruce Evans <brde@optusnet.com.au>, FreeBSD-gnats-submit@freebsd.org
Subject: Re: kern/175759: Correct data types for fields of struct qm_trace{}
 from <sys/queue.h>
Date: Tue, 5 Feb 2013 16:02:18 +0400

 On Tue, Feb 05, 2013 at 01:35:50PM +0200, Andrey Simonenko wrote:
 A> > Unsigned long is unnecessarily large.  It wastes space on 64-bit
 A> > arches.  The change doesn't change the wastage, because space was
 A> > already wasted on 64-bit arches by mispacking the struct (with
 A> > unnamed padding after the ints).  It changes the API unnecessarily
 A> > by changing signed variables to unsigned.  Sign variables are
 A> > easier to use, and changing to unsigned ones risks sign extension
 A> > bugs.
 A> 
 A> I did not change order of fields to not change API, that's why
 A> bigger data type is used without changing size of that structure
 A> due to padding (at least for current sizes of int and long).
 
 We don't claim to be ABI stable for binaries that contain additional
 debugging information. They don't go into releases, and they alredy
 are incompatible with non-debugging binaries.
 
 So this isn't a problem.
 
 
 -- 
 Totus tuus, Glebius.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302051210.r15CA1Z6031841>