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

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

2021-09-13 Thread Alex Peshkoff via Firebird-devel
On 9/12/21 6:40 PM, Dimitry Sibiryakov wrote: Alex Peshkoff via Firebird-devel wrote 15.05.2018 12:13: On 05/15/18 13:06, Dimitry Sibiryakov wrote: 15.05.2018 11:58, Alex Peshkoff via Firebird-devel wrote:   Do alignment of fields in C struct matches alignment of the same fields in MessageBuff

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

2021-09-12 Thread Dimitry Sibiryakov
Alex Peshkoff via Firebird-devel wrote 15.05.2018 12:13: On 05/15/18 13:06, Dimitry Sibiryakov wrote: 15.05.2018 11:58, Alex Peshkoff via Firebird-devel wrote:   Do alignment of fields in C struct matches alignment of the same fields in MessageBuffer?   If at compile/preprocess time construct a

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

2018-05-15 Thread Alex Peshkoff via Firebird-devel
On 05/15/18 13:06, Dimitry Sibiryakov wrote: 15.05.2018 11:58, Alex Peshkoff via Firebird-devel wrote:   Do alignment of fields in C struct matches alignment of the same fields in MessageBuffer?   If at compile/preprocess time construct a struct to be used directly in OO API, will it be reliabl

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

2018-05-15 Thread Dimitry Sibiryakov
15.05.2018 11:58, Alex Peshkoff via Firebird-devel wrote:   Do alignment of fields in C struct matches alignment of the same fields in MessageBuffer?   If at compile/preprocess time construct a struct to be used directly in OO API, will it be reliable? Not always.  For example, on 32-bit linu

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

2018-05-15 Thread Alex Peshkoff via Firebird-devel
On 05/15/18 12:55, Dimitry Sibiryakov wrote: Hello, All.   Do alignment of fields in C struct matches alignment of the same fields in MessageBuffer?   If at compile/preprocess time construct a struct to be used directly in OO API, will it be reliable? Not always.  For example, on 32-bit li

[Firebird-devel] MessageBuffer vs C struct alignment

2018-05-15 Thread Dimitry Sibiryakov
Hello, All. Do alignment of fields in C struct matches alignment of the same fields in MessageBuffer? If at compile/preprocess time construct a struct to be used directly in OO API, will it be reliable? -- WBR, SD. -