It was an alignment error. I thought the alignment check was active in SysInitThreadvar but a) it was commented out, and b) the ifdef check was incorrect anyway.
On Fri, Jul 3, 2020 at 9:47 AM Christo Crause <christo.cra...@gmail.com> wrote: > Busy working on threading and TLS, started with a stand-alone unit along > the lines of cthreads and using OS memory allocation for storing the TLS > blocks. After initializing (calling SysInitMultithreading) a block of > memory is allocated and threadvars copied. However there appears to be a > two byte offset in the location of the threadvars after relocating them, > see test and output below. >
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel