boostorg / context

307 stars 150 forks source link

restore work with TLS[__PTK_LIBC_DYLD_Unwind_SjLj_Key] on arm aapcs macho #188

Closed apolukhin closed 3 years ago

apolukhin commented 3 years ago

I've found this fix in our codebase. Not sure how it works, but my guess is following:

__PTK_LIBC_DYLD_Unwind_SjLj_Key is defined in https://opensource.apple.com/source/libpthread/libpthread-137.1.1/private/tsd_private.h as #define __PTK_LIBC_DYLD_Unwind_SjLj_Key 18. Multiplying it on a size of a pointer gives 72.

P.S.: it already was 72 before https://github.com/boostorg/context/commit/763f28542d3c2931ead6eef1409b113155e9a1c9

olk commented 3 years ago

So MacOS uses setjump/long jump for exception handling implementation?

apolukhin commented 3 years ago

So MacOS uses setjump/long jump for exception handling implementation?

Not sure. Just showing a patch and my guesses why it does a proper change

olk commented 3 years ago

ty - could you check branch develop, please

apolukhin commented 3 years ago

Testing of the develop branch can not happen soon due to specifics of our development.

However, there's now no diff between develop branch of context and the version that we use. Seems good!

Many thanks!