From owner-freebsd-bugs Sun May 18 20:35:49 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id UAA00146 for bugs-outgoing; Sun, 18 May 1997 20:35:49 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id UAA00141 for ; Sun, 18 May 1997 20:35:46 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id NAA29656; Mon, 19 May 1997 13:29:10 +1000 Date: Mon, 19 May 1997 13:29:10 +1000 From: Bruce Evans Message-Id: <199705190329.NAA29656@godzilla.zeta.org.au> To: dg@root.com, gibbs@plutotech.com Subject: Re: kern/3618: getsockname and getpeername may cause trap 12 Cc: freebsd-bugs@hub.freebsd.org, wollman@khavrinen.lcs.mit.edu Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >>I think that the splnet() and perhaps the other initializers should be >>broken appart from the declarations since, as I recall, he compiler can >>re-order the initializations if it doesn't see any interdependancies. >>It would also make it clearer exactly which actions need splnet protection. The extern function call and visible side effects in the inline function call should prevent reordering. It's just unclear. > I agree. It's the one thing that caught my eye immediately when I looked at >the diff. Besides, style(9) explicitly says not to obfuscate code by initializing variables in declarations. This obfuscation should only be used thoughfully. :-). Bruce