I tried to compile with FPC 3.0.4 for Win32 and it works. The problems occurs only on FPC 3.0.4 Win64. I edited the function to log to a file some debug text as first instruction of the function and it's not invoked, so I think on Win64 Firebird doesn't even make to call the UDF. Anybody could help me to figure out what's wrong with the FPC 64bit compiler? Is there any compile/linker flag that I should use?
To recap, the same UDF code: - Works with FPC 3.0.4 on Linux 32bit and 64bit - Works with FPC 3.0.4 on on Windows 32 bit - Works with FPC 2.6.4 on Windows 32 bit and 64 bit - * It doesn't work on FPC 3.0.4 on Windows 64 bit* On Mon, May 6, 2019 at 3:24 PM Massimo Fazzolari <[email protected]> wrote: > Do you check returned value for nil? > > > Yes, this Simple function is just one of a big set of UDFs that we > exported in the same dll/so file. We have been using these functions in > production for more than 10 years. I stumbled upon this issue when I tried > to compile the same working code (without any change) using FPC 3.0.4. > > > > On Mon, May 6, 2019 at 3:12 PM Dimitry Sibiryakov <[email protected]> > wrote: > >> 06.05.2019 14:59, Massimo Fazzolari wrote: >> > I use this udfmalloc, on windows is defined as: >> > function udfmalloc(Size: Integer): Pointer; cdecl; external >> 'ib_util.dll' name >> > 'ib_util_malloc'; >> >> Do you check returned value for nil? >> >> BTW, "Integer" is not always right declaration for the argument. Check >> that it is >> always 32 bits wide on Windows and 32/64 bits on Linux. >> >> -- >> WBR, SD. >> >> >> Firebird-Devel mailing list, web interface at >> https://lists.sourceforge.net/lists/listinfo/firebird-devel >> >
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
