Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 May 1997 13:29:10 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        dg@root.com, gibbs@plutotech.com
Cc:        freebsd-bugs@hub.freebsd.org, wollman@khavrinen.lcs.mit.edu
Subject:   Re: kern/3618: getsockname and getpeername may cause trap 12
Message-ID:  <199705190329.NAA29656@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>>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



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