El 09/12/17 a les 11:57, Luca Olivetti via Lazarus ha escrit:

I know I'll have to upgrade to fpc 3 someday, but what worries me about it is my (and other 3rd party units) use of ansistrings as binary buffers. I did some quick tests some time ago an nothing seemed broken, but I'm somewhat reluctant since my software has to run unattended 24/7 (or more like 24/5).


I've done some tests with 3.0.4 and it turns out I'm bitten by the extensive changes in tthread: freeing a thread in its OnTerminate[*] randomly (i.e. not every time) produces a sigsev (under win32). With 2.6.4 it didn't happen (though freeing a thread in OnTerminate had another problem undes Linux, see https://bugs.freepascal.org/view.php?id=32759)

[*] I don't know if freeing a thread in OnTerminate is allowed. FPC documentation here https://www.freepascal.org/docs-html/rtl/classes/tthread.onterminate.html says nothing about it, but the example here (mentioned in the bug report) http://docwiki.embarcadero.com/CodeExamples/Tokyo/en/TThreadYield_(Delphi) seems to imply that it should.

For the time being I'm using FreeOnTerminate:=true and avoid freeing the thread in OnTerminate (though there are other changes required to my code and "fixing" working code is always an issue). I checked the user changes pages for 3.0.0, 3.0.2 and 3.0.4 and there's no mention of changes in threads (the only one is this one http://wiki.freepascal.org/User_Changes_3.0#cthreads:_critical_sections_and_recursive_mutex_support and doesn't apply here).

Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to