[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: o_private (Was: (ITS#4184) Lockup when moding one particular entry)

On Tue, 2005-12-27 at 13:46 -0800, Howard Chu wrote:

> Are you convinced that push/pop is sufficient, will there ever be an 
> out-of-order access?

As far as I understand the current code usage, yes.  I'd even use cross
checks on popping to detect logical errors in the (correct) use of
o_private (I've replaced the current usage in do_add() with a more
appropriate solution, and I suspect the same should be done in
syncprov).  I note from the debugging output I temporarily placed in the
PUSH/POP macros that in some cases nested PUSH/POP sequences may appear
during some operations; I intendedly used the address of the temporary
as key in write functions to avoid intermixing temporaries and heap, but
even using the same pointer as key, a new PUSH/POP occurs.  I haven't
traced the exact location of their occurrences, but given the above it
sounds like bdb_entry_get() happens first, followed by a write operation
which always PUSHes the opinfo.

Note that the above solution doesn't account (yet) for those cases where
we create automatic temporary Operation that get copied from a real one
and thus inherit the o_private member...

If we need out-of-order access, then we'll likely need a destructor
function, which should be called also when "destroying" temporaries.
This doesn't sound very appealing.


Ing. Pierangelo Masarati
Responsabile Open Solution
OpenLDAP Core Team

SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
Office:   +39.02.23998309          
Mobile:   +39.333.4963172
Email:    pierangelo.masarati@sys-net.it