Skip to content

Conversation

@gareth-rees
Copy link
Member

This makes the test portable to XCA6LL, where the page size (and so the minimum arena grain size) can be 16 kB.

This fixes one of the test failures in #84.

On Apple Silicon, when Hardened Runtime is in force and the
application lacks the "Allow Unsigned Executable Memory Entitlement",
mmap and mprotect return EACCES when an attempt is made to create or
modify memory so that it is simultaneously writable and executable.

This commit handles these cases by retrying the operation without the
PROT_EXEC flag, and setting global variables so that future operations
omit the flag.
* Use memory-model-aware builtins in GCC and Clang when a memory
  location may be written by one thread and read by another, avoiding
  race conditions due to out-of-order updates on ARM.
* Call dylan_make_wrappers while the test is still single-threaded,
  preventing multiple threads from racing to call it.
* Prevent dylan_init from creating a padding object, as we must not
  have an exact root pointing at a padding object.
This makes the test portable to XCA6LL, where the page size (and so
the minimum arena grain size) can be 16 kB.
@rptb1 rptb1 added the arch.a6 Relates to arm64/aarch64 label Jan 17, 2023
@rptb1 rptb1 added the blocked Unable to proceed. See comment for reason. label Feb 14, 2023
@thejayps thejayps added the optional Will cause failures / of benefit. Worth assigning resources. label Mar 27, 2023
@thejayps
Copy link
Contributor

@rptb1 : blocked because waiting for Apple Silicon CI. See #145

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

Labels

arch.a6 Relates to arm64/aarch64 blocked Unable to proceed. See comment for reason. optional Will cause failures / of benefit. Worth assigning resources.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants