[omniORB] Potential crash in omniORB logger

Duncan Grisby duncan at grisby.org
Mon Feb 23 11:39:24 GMT 2015


On Tue, 2015-02-17 at 12:34 +0100, Peter Klotz wrote:

> logfunc() returns a reference to a statically stored function pointer.
> If a custom log function is set using setLogFunction() and later reset
> to the initial null pointer there is a race condition involved. The
> first evaluation of logfunc() can return a non-null pointer whereas the
> second evaluation returns a null pointer. So the second call crashes
> the application. We have seen this happening in internal tests.
> 
> The attached patch fixes this problem by performing only one evaluation
> per logging operation. So either the custom log function is seen and
> used or the null pointer is seen and omniORB's default logging behavior
> is used.

Thanks. I've applied your patch.

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --





More information about the omniORB-list mailing list