Windows XP support in Island and TLS



The documentation says that Windows XP and even earlier are supported:

Development of Island apps for Windows is supported in both Visual Studio and in Fire on the Mac. Depending on API usage, they can be deployed to any 32-bit or 64-bit Windows version, back from Windows NT and 95 through the latest Windows 10.

However I noticed that Elements binaries (well, at least Silver binaries, but since you have a single compile backend I suppose it applies to all languages) have a .tls section and a TLS directory…

The thing is is implicit TLS initialization of dynamically loaded DLLs is completely broken in pre-Vista versions of Windows. Broken to the level of random data corruptions and crashing.

I didn’t look at the details too much, but if the IslandRTL or compiler really need implicit TLS you need to forgo pre-Vista support. If you need TLS but don’t have to use implicit TLS you can insert calls to the TLS APIs (TlsAlloc etc.). If you don’t need or use TLS at all you should certainly remove whatever reason causing the .tls section and directory to be generated, because it makes the binaries look as unsafe to use on pre-Vista.

Details on implicit TLS and the problems before untils Vista are briefly covered in the following post by Raymond Chen:

More details are available in Skywing’s series on the topic.

… And you can try Googling “implicit tls windows xp” to see how many people and projects got bitten by this.


(Carlo Kok) #2

We use it in the Task support:

That said if you don’t use tasks, it won’t hit (so at least it shouldn’t be a big problem on XP)