bug in 3.2.0 nmblookup

Zachary Loafman zachary.loafman at isilon.com
Fri Jul 4 08:53:17 GMT 2008


>   Nope.  ISO C99 forbids pointers of different types from pointing to
> the same memory location.  So the code in Samba (and in many other
> programs) violates the spec.  Hence the ''fno-strict-aliasing'
argument
> to GCC, which allows your programs to continue working.

Samba has no trouble compiling that code under -O2 -Wall (which turns on
-fstrict-aliasing and -Wstrict-aliasing). The compiler is frequently
smart enough to know whether aliasing is a real issue inside a given
function. The case in point was not such a case.

...Zach


More information about the samba-technical mailing list