Skip to content

Commit

Permalink
The functions threadSelfRestrictSupported, threadSelfRestrictRWXToRW …
Browse files Browse the repository at this point in the history
…and threadSelfRestrictRWXToRX are incompatible with AddressSanitizer.

https://bugs.webkit.org/show_bug.cgi?id=270569

Reviewed by Keith Miller.

Suppress ASan instrumentation on threadSelfRestrictSupported,
threadSelfRestrictRWXToRW and threadSelfRestrictRWXToRX.

* Source/JavaScriptCore/assembler/FastJITPermissions.h:

Canonical link: https://commits.webkit.org/275744@main
  • Loading branch information
TuomasWebKit authored and Mark Lam committed Mar 6, 2024
1 parent 9c85c7c commit 7cbf038
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/JavaScriptCore/assembler/FastJITPermissions.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,18 @@ static ALWAYS_INLINE void threadSelfRestrictRWXToRX()
#elif USE(APPLE_INTERNAL_SDK)
#include <os/thread_self_restrict.h>

static ALWAYS_INLINE bool threadSelfRestrictSupported()
SUPPRESS_ASAN static ALWAYS_INLINE bool threadSelfRestrictSupported()
{
return !!os_thread_self_restrict_rwx_is_supported();
}

static ALWAYS_INLINE void threadSelfRestrictRWXToRW()
SUPPRESS_ASAN static ALWAYS_INLINE void threadSelfRestrictRWXToRW()
{
ASSERT(g_jscConfig.useFastJITPermissions);
os_thread_self_restrict_rwx_to_rw();
}

static ALWAYS_INLINE void threadSelfRestrictRWXToRX()
SUPPRESS_ASAN static ALWAYS_INLINE void threadSelfRestrictRWXToRX()
{
ASSERT(g_jscConfig.useFastJITPermissions);
os_thread_self_restrict_rwx_to_rx();
Expand Down

0 comments on commit 7cbf038

Please sign in to comment.