Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!

C++Builder 10.3.3 Threading and TLS Patch

An issue with thread-local storage that could cause AVs on some Win64 machines has been resolved

We’ve just released a patch for C++Builder 10.3.3 that resolves:

  • RSP-27180 64-bit builds crash with threads
    Creating and using a thread (eg std::thread) could result in an access violation on some machines.

This was caused by an error setting up the Win64 32-byte shadow space inside the assembly code to clean up TLS (thread-local storage) data, combined with the compiler applying a tail-call optimization to a method call (HeapFree) called within that, which meant that with the compiler optimization applied the effective caller of HeapFree was the code that incorrectly set up the shadow space. On some machines, possibly dependent on different Windows builds, HeapFree uses that shadow space, and so the TLS cleanup crashed. The patch correctly sets up the shadow space, and the crash no longer occurs.

The patch is available here: https://cc.embarcadero.com/item/30909 Full installation instructions are included in the readme.

Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

About author

David is an Australian developer, currently living in far-north Europe. He is the senior product manager for C++ at Idera, looking after C++Builder and Visual Assist.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.