Re: [Firebird-devel] Memory manager cleanup / external libraries

2021-09-16 Thread Dimitry Sibiryakov
Adriano dos Santos Fernandes wrote 16.09.2021 21:43: And it should happen if you called it before de constructors. Or it was not done in this way? I didn't call it at all. Firebird engine did it for me. Are there any published test? Did it was compiled with c++11? Look at whole thread:

Re: [Firebird-devel] Memory manager cleanup / external libraries

2021-09-16 Thread Adriano dos Santos Fernandes
On 16/09/2021 16:13, Dimitry Sibiryakov wrote: > Adriano dos Santos Fernandes wrote 16.09.2021 21:08: >> And this has 0 importance for the matter, considering that tools >> vendors implement what the standard describes. > >   We already had a discussion here that shown that atexit (and called > fr

Re: [Firebird-devel] Firebird 4 - MON$ / Trace API changes?

2021-09-16 Thread Thomas Steinmaurer
Hi Mark, On 2021-09-13 15:59, Maya Opperman wrote:   Another possibility is to set coercion rules for new data type for your connection, see https://firebirdsql.org/file/documentation/release_notes/html/en/4_0/rlsnotes40.html#rnfb4-msql-set-bind-native-to-legacy-coercion-rules Thanks Vlad!

Re: [Firebird-devel] Memory manager cleanup / external libraries

2021-09-16 Thread Adriano dos Santos Fernandes
On 16/09/2021 16:27, Dimitry Sibiryakov wrote: > Adriano dos Santos Fernandes wrote 16.09.2021 20:39: >> I wanted to control the order of constructors mostly to control the >> order of destructors (which should be inverse). > >   KISS. Just gather them all into single CPP file. > Ok. Let's creat

Re: [Firebird-devel] Memory manager cleanup / external libraries

2021-09-16 Thread Dimitry Sibiryakov
Adriano dos Santos Fernandes wrote 16.09.2021 20:39: I wanted to control the order of constructors mostly to control the order of destructors (which should be inverse). KISS. Just gather them all into single CPP file. -- WBR, SD. Firebird-Devel mailing list, web interface at https://lis

Re: [Firebird-devel] Memory manager cleanup / external libraries

2021-09-16 Thread Dimitry Sibiryakov
Adriano dos Santos Fernandes wrote 16.09.2021 21:08: And this has 0 importance for the matter, considering that tools vendors implement what the standard describes. We already had a discussion here that shown that atexit (and called from it PluginModule::doCleanup()) is fired after global de

Re: [Firebird-devel] Memory manager cleanup / external libraries

2021-09-16 Thread Adriano dos Santos Fernandes
On Thu, Sep 16, 2021 at 4:04 PM Dimitry Sibiryakov wrote: > Adriano dos Santos Fernandes wrote 16.09.2021 20:39: > > It looks like there is another way to make that. > > > > std::atexit (https://en.cppreference.com/w/cpp/utility/program/atexit) > docs says: > >No matter what docs say, std::at

Re: [Firebird-devel] Memory manager cleanup / external libraries

2021-09-16 Thread Dimitry Sibiryakov
Adriano dos Santos Fernandes wrote 16.09.2021 20:39: It looks like there is another way to make that. std::atexit (https://en.cppreference.com/w/cpp/utility/program/atexit) docs says: No matter what docs say, std::atexit is just a synonym for atexit. -- WBR, SD. Firebird-Devel mailing

Re: [Firebird-devel] Memory manager cleanup / external libraries

2021-09-16 Thread Adriano dos Santos Fernandes
Let's recap that. I wanted to control the order of constructors mostly to control the order of destructors (which should be inverse). Then a non-GlobalPtr/-InitInstance object allocating memory would not cause a crash if the memory manager is destroyed before it. It looks like there is another w

Re: [Firebird-devel] Memory manager cleanup / external libraries

2021-09-16 Thread Alex Peshkoff via Firebird-devel
On 9/16/21 4:38 PM, Adriano dos Santos Fernandes wrote: Hi! Unfortunately init_priority do not work as we intended in MacOS. clang generate correct assembly/object file but the MacOS linker do not sort and merge the sections of different files. Pity. But typical for Mac :-( Firebird-Devel

Re: [Firebird-devel] Memory manager cleanup / external libraries

2021-09-16 Thread Adriano dos Santos Fernandes
Hi! Unfortunately init_priority do not work as we intended in MacOS. clang generate correct assembly/object file but the MacOS linker do not sort and merge the sections of different files. The result is that it reorder correctly only per cpp file, not across different cpp files. Adriano Fire

Re: [Firebird-devel] MessageBuffer vs C struct alignment

2021-09-16 Thread Dimitry Sibiryakov
Alex Peshkoff via Firebird-devel wrote 16.09.2021 12:21: In new version we can easily change MessageBuffer format. Or we can return XSQLDA to OO API and deprecate MessageBuffer repeating evolution of ISC API. -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sour

Re: [Firebird-devel] MessageBuffer vs C struct alignment

2021-09-16 Thread Dimitry Sibiryakov
Alex Peshkoff via Firebird-devel wrote 16.09.2021 12:21: In new version we can easily change MessageBuffer format. The main issue is old user's binaries - probably to support them we will need some tricks in remote redirector & copy/in/out in dsql.cpp. This trick could be "use offsets from p

Re: [Firebird-devel] MessageBuffer vs C struct alignment

2021-09-16 Thread Alex Peshkoff via Firebird-devel
On 9/16/21 1:00 PM, Dimitry Sibiryakov wrote: Alex Peshkoff via Firebird-devel wrote 16.09.2021 11:52: First of all it's good to know what places are affected. Do not want to try to guess them.   ODS The most strightforward solution for FB5 is new major ODS. For FB4 I see only one solution

Re: [Firebird-devel] MessageBuffer vs C struct alignment

2021-09-16 Thread Dimitry Sibiryakov
Alex Peshkoff via Firebird-devel wrote 16.09.2021 11:52: First of all it's good to know what places are affected. Do not want to try to guess them. ODS and MessageBuffer at least. Record is an internal thing and can be ignored. -- WBR, SD. Firebird-Devel mailing list, web interface at

Re: [Firebird-devel] MessageBuffer vs C struct alignment

2021-09-16 Thread Alex Peshkoff via Firebird-devel
On 9/16/21 12:18 PM, Dimitry Sibiryakov wrote: Alex Peshkoff via Firebird-devel wrote 13.09.2021 9:39: Yes, that should be fixed. If one builds FB with native __int128 it fails on unaligned data access. But changing alignment requirement to 16 bytes is not enough - appears some buffers are no

Re: [Firebird-devel] MessageBuffer vs C struct alignment

2021-09-16 Thread Dimitry Sibiryakov
Alex Peshkoff via Firebird-devel wrote 13.09.2021 9:39: Yes, that should be fixed. If one builds FB with native __int128 it fails on unaligned data access. But changing alignment requirement to 16 bytes is not enough - appears some buffers are not aligned at 16-bit cause FB fails exactly in t