svn commit: samba r11658 - in branches/SAMBA_3_0/source: .

Jeremy Allison jra at samba.org
Fri Nov 11 17:06:52 GMT 2005


On Fri, Nov 11, 2005 at 09:01:21AM -0800, Jeremy Allison wrote:
> On Fri, Nov 11, 2005 at 08:48:43AM -0500, Green, Paul wrote:
> > > Jeremy Allison wrote:
> > |> Jerry Carter wrote:
> > |> Log:
> > |> Someone broke the initialization of the static modules by adding a
> > |> 'NTSTATUS' declaration before their call.
> > |> The compiler sees : { NTSTATUS fn_foo(); NT_STATUS fn_bar(); } as 
> > |> *definitions: They need to be : { fn_foo(); fn_bar(); } Jeremy.
> > |
> > | Strangely enough this was only broken in SAMBA_3_0, not HEAD. Odd.
> > >
> > >That was Paul checkin.  Sorry Paul.
> > 
> > Yeah, I was going to reply with "That wasn't someone, that was me."  I
> > am not hiding. I did it. However, I most certainly tested this change
> > (one two platforms, VOS and SuSE Linux) and I can assure you that it is
> > a good change.  I can also assure you that it is a most necessary change
> > for gcc on VOS. 
> > 
> > Oddly enough, it broke on the build farm machine that I myself run --
> > berks!!  This is a fairly slow machine (~300 MHz).  The log shows that
> > the build exceeded the time limit...
> > 
> > Would you mind if I restore the change?
> 
> Very much ! It breaks Samba completely on Linux (maybe with old compilers,
> but still). This change is absolutely incorrect.

The reason is this :

{ NTSTATUS fn_foo();  }

is not seen as a function call, it is seen as a declaration. This
means that none of the passdb modules get initialized. At all.

As you can imagine this breaks everything...

Now, if you replaced this with :

{ NTSTATUS foo_ret = fn_foo(); }

(when you modify foo_ret for each call so that you don't get duplicate
declarations) then that should work.

Jeremy.


More information about the samba-technical mailing list