On 15/04/2021 08:33, Adriano dos Santos Fernandes wrote:
> On 15/04/2021 07:55, Alex Peshkoff via Firebird-devel wrote:
>>>
>>> It uses global std objects which in this case have theirs destructors
>>> called after Firebird default pool are already cleaned up.
>>
>> Yes, that's really a problem. And must say that even forgetting about
>> MemPool implementation details I hardly understand how is it supposed to
>> work with redefined new / delete. One can have global objects in a unit,
>> implementing new and delete, but Ido not know how does standard suppose
>> to have working new/delete before constructors and after destructors of
>> that objects are executed.
>>
> 
> Could you give more details of what you mean?
> 

I had new segfaults which may be related to what you were saying.

Boost.Test code calling new operator before init.cpp/init() was called.

To make that also work, I had used this instead of relying on
InstanceControl calling init():

----
class Init
{
public:
        Init()
        {
                init();
        }
};

Init initGlobal __attribute__ ((init_priority (2000)));
----


Adriano


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to