Nils Goroll writes:
> I am crossposting to networking-discuss and tools-compilers because I am not
> sure if this is a compiler issue or a bug in the rpc module:
It's a bug in the "rpc" module. Tunables must never be declared
'static' or the compiler can and will optimize them away (as you've
discovered). This is a fairly old but recurring issue -- see CRs
4354490 and 6734437.
It's something that code reviewers should catch.
> Any pointers are highly appreciated. If this is not a compiler bug, I'd open
> a
> bug and prepare a webrev with the fix. If this issue is fixed with current
> compilers, I apologize for the noise.
Not a compiler bug, in my opinion. The compiler is doing exactly what
we told it to do ("assume nobody outside of this module can modify
this value unless someone here takes its address") ... just not what
we wanted.
--
James Carlson, Solaris Networking <james.d.carlson at sun.com>
Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677