Title: Re: [Firebird-devel] Firebird UDF compiled with Lazarus 2.0.0 and FPC 3.0.4
More than 15 years ago, I found that FPC didn't produce PIC code, and this made UDFs to crash the FB server.

When I was testing, it was really easy to reproduce the problem, specially with SuperServer: open two connections and run a SP that calls the UDF inside a big loop. You must do this in both connections at the same time. In my tests, it always crashed FB after a few seconds running.

I hope FPC has improved in this aspect and maybe now it can be safely used to create UDFs.

[]s
Carlos
http://www.firebirdnews.org
FireBase - http://www.FireBase.com.br


Thank you all guys, I finally managed to fix the issue:
  • There was an initialization section in one unit imported that set IsMultiThread = True
  • I removed the cthreads unit in the uses clause.
Does anybody have any clue what are the implications of these changes?



On Thu, Feb 27, 2020 at 1:41 PM liviuslivius <
liviusliv...@poczta.onet.pl> wrote:

Two things

1. What is calling convention should be cdecl.
2. How do you alloc memory for string?

Regards,
Karol Bieniaszewski

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

Reply via email to