May be has nothing to do with Mark's problem, but inet.cpp/alloc_port
seems to have a race problem:

----------
if (!INET_initialized)
{
    MutexLockGuard guard(init_mutex, FB_FUNCTION);
    if (!INET_initialized)
    {
        ...

        INET_initialized = true;

        // This should go AFTER 'INET_initialized = true' to avoid recursion
        inet_async_receive = alloc_port(0);
        inet_async_receive->port_flags |= PORT_server;
    }
}

...

port->port_async_receive = inet_async_receive;
----------

Someone may pass the if (!INET_initialized) with INET_initialized ==
true, but inet_async_receive still being NULL.


Adriano


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to