rtl: TLS handling in FPC x86_64-linux RTL leads to crash
Original Reporter info from Mantis: AntonK
-
Reporter name: Anton Kavalenka
Original Reporter info from Mantis: AntonK
- Reporter name: Anton Kavalenka
Description:
Only x86_64-linux
Run the attached test. Process loads 2 DLLs in main thread, calls one function in main thread.
Then thread is started, another function called (as it touches output file - it causes TLS reallocation).
Unloading DLLs before thread stopping leads to crash in posix_threads library.
Stopping threads before DLL unload works properly.
C++ DLL behaves propely in both ways.
C++ dll built in the following way:
g++ -shared -fPIC b.cpp -o libb.so
Steps to reproduce:
Run the attached test.
Mantis conversion info:
- Mantis ID: 36880
- Version: 3.3.1
- Monitored by: » Vincent (Vincent Snijders)