LDB hidden memory leaks

Kamen Mazdrashki kamenim at gmail.com
Sun Jul 11 19:03:25 MDT 2010


On Mon, Jul 12, 2010 at 03:38, Kamen Mazdrashki <kamenim at gmail.com> wrote:

> On Mon, Jul 12, 2010 at 02:53, Andrew Bartlett <abartlet at samba.org> wrote:
>
>>
>> None of this allows us to breach the ABI we have promised.  All we can
>> do is change the compile-time marking so that a developer knows to use
>> something else.  We MUST NOT change the semantics of the original
>> call.
>
>
> Perhaps you are right... if there was a spec describing in more details
> what those functions should do.
> As far as I see, the only spec we have is in the code in form
> of code snippets using those functions (I may be quite wrong here though).
> Despite those code snippets, we have different usage even in Samba -
> in few places returned message is moved into another mem context,
> in others it is not.
>
> I still think that making this leak more obvious (in a way) is
> the right way to do this.
> May be not so rapidly - for example we may just warn with DEPRECATED
> now and in a few months moving allocation from ldb_context to NULL?
> Anyway, I can write down a Big Comment to emphasize that memory
> is allocated in ldb_context and caller should steal it.
>
>
I've missed an additional note to make here.
I totally agree with you that we must not breach the ABI.
Just want to start a discussion on "at what level we are
to support this ABI" topic.
I am not aware of any promises in this direction, so thanks
in advance for clarifying :)

-- 
CU,
Kamen


More information about the samba-technical mailing list