Skip to content

Conversation

hmelder
Copy link
Member

@hmelder hmelder commented Sep 29, 2025

Complexity of the Blocks Runtime in libdispatch is lower and only copies the block descriptor not the body. This means we do not need to mprotect a page as -W- and then R-X to execute copied instructions.

@hmelder
Copy link
Member Author

hmelder commented Sep 29, 2025

Because of this, there is no need for a thunk written in assembly to jump to the block body residing in the mprotected page.

@triplef
Copy link
Member

triplef commented Sep 30, 2025

Sounds great! Builds are currently failing with:

CMake Error at CMakeLists.txt:252 (message):
  libBlocksRuntime does not contain _Block_use_RR2().  Enable
  EMBEDDED_BLOCKS_RUNTIME to use the built-in blocks runtime.

@hmelder
Copy link
Member Author

hmelder commented Sep 30, 2025

I know. The header is not in the search path. So this is just a CMake Configuration issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants