Date: Sat, 12 Jan 2008 17:36:45 -0700 (MST) From: "M. Warner Losh" <imp@bsdimp.com> To: rwatson@FreeBSD.org Cc: src-committers@FreeBSD.org, cvs-all@FreeBSD.org, cvs-src@FreeBSD.org, obrien@FreeBSD.org, max@love2party.net, sam@errno.com Subject: Re: cvs commit: src/sys/netinet6 frag6.c icmp6.c in6.c in6_ifattach.c in6_pcb.c in6_proto.c in6_rmx.c in6_src.c ip6_input.c ip6_mroute.c ip6_output.c mld6.c nd6.c nd6_nbr.c nd6_rtr.c raw_ip6.c udp6_usrreq.c Message-ID: <20080112.173645.420517174.imp@bsdimp.com> In-Reply-To: <20080110085803.H66908@fledge.watson.org> References: <20080109201424.GA4969@server.vk2pj.dyndns.org> <478531AC.5030303@errno.com> <20080110085803.H66908@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20080110085803.H66908@fledge.watson.org> Robert Watson <rwatson@FreeBSD.org> writes: : In the past, we've had several subtle bugs crop up as a result of : changing to ANSI C function prototypes, which no longer : automatically promote arguments to int from shorter types (I think : it's that way around). This caused some very subtle semantic : changes in the socket code a few years ago and was a nightmare to : track down. Unfortunately, I don't remember the details or I'd dig : up the commit that fixed it, it was really quite tricky, as what on : face value was a style change actually changed the semantics : significantly. Yes. The changes there are when the prototype was introduced. In the absence of a prototype, all things are promoted to int or long or are a pointer. The usual cause for problems is where something was promoted without sign extension before the prototype, and with sign extension after (or vice versa). This is one reason why most kernel files have prototypes at the top of them for all static functions in the file. When the prototype is encountered, it doesn't matter if the definition later in the file is done in the old style or new style: all functions in the file are treated the same. However, that's not what happened here. Syntactic sugar was removed that lead to binaries of the same md5. We need to be careful to not make too big a deal out of that... My concern with doing style sweeps now is that it may delay 7.0 getting out, or make it harder than necessary to merge things. We should strive to keep them to a minimum unless active work is going on that isn't going to be merged back into 7.0 anyway (which should be most things today). I share the concern for unreviewed changes, and there's no need to beat on that drum further. So please read this as a 'now is a good time for a reminder' rather than a complaint about this specific commit. Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080112.173645.420517174.imp>