Merge branch 'dev' of https://git.hush.is/hush/hush3 into dev
This commit is contained in:
@@ -14,7 +14,7 @@ $(package)_dependencies=wolfssl
|
||||
$(package)_download_path=https://curl.haxx.se/download
|
||||
$(package)_config_opts_linux=--disable-shared --enable-static --without-ssl --prefix=$(host_prefix) --host=$(host)
|
||||
$(package)_config_opts_mingw32=--enable-mingw --disable-shared --enable-static --with-wolfssl --without-ssl --prefix=$(host_prefix) --host=x86_64-w64-mingw32
|
||||
$(package)_config_opts_darwin=--disable-shared --enable-static --with-wolfssl --without-ssl --prefix=$(host_prefix)
|
||||
$(package)_config_opts_darwin=--disable-shared --enable-static --without-ssl --prefix=$(host_prefix)
|
||||
$(package)_cflags_darwin=-mmacosx-version-min=10.9
|
||||
$(package)_conf_tool=./configure
|
||||
|
||||
|
||||
@@ -148,9 +148,9 @@ void* allocMemoryPages(size_t bytes) {
|
||||
mem = NULL;
|
||||
#if defined(USE_PTHREAD_JIT_WP) && defined(MAC_OS_VERSION_11_0) \
|
||||
&& MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_11_0
|
||||
if (__builtin_available(macOS 11.0, *)) {
|
||||
//if (__builtin_available(macOS 11.0, *)) {
|
||||
pthread_jit_write_protect_np(0);
|
||||
}
|
||||
//}
|
||||
#endif
|
||||
#endif
|
||||
return mem;
|
||||
@@ -173,11 +173,11 @@ void setPagesRW(void* ptr, size_t bytes) {
|
||||
char *errfunc;
|
||||
#if defined(USE_PTHREAD_JIT_WP) && defined(MAC_OS_VERSION_11_0) \
|
||||
&& MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_11_0
|
||||
if (__builtin_available(macOS 11.0, *)) {
|
||||
//if (__builtin_available(macOS 11.0, *)) {
|
||||
pthread_jit_write_protect_np(0);
|
||||
} else {
|
||||
pageProtect(ptr, bytes, PAGE_READWRITE, &errfunc);
|
||||
}
|
||||
//} else {
|
||||
// pageProtect(ptr, bytes, PAGE_READWRITE, &errfunc);
|
||||
//}
|
||||
#else
|
||||
pageProtect(ptr, bytes, PAGE_READWRITE, &errfunc);
|
||||
#endif
|
||||
@@ -187,12 +187,12 @@ void setPagesRX(void* ptr, size_t bytes) {
|
||||
char *errfunc;
|
||||
#if defined(USE_PTHREAD_JIT_WP) && defined(MAC_OS_VERSION_11_0) \
|
||||
&& MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_11_0
|
||||
if (__builtin_available(macOS 11.0, *)) {
|
||||
//if (__builtin_available(macOS 11.0, *)) {
|
||||
pthread_jit_write_protect_np(1);
|
||||
__builtin___clear_cache((char*)ptr, ((char*)ptr) + bytes);
|
||||
} else {
|
||||
pageProtect(ptr, bytes, PAGE_EXECUTE_READ, &errfunc);
|
||||
}
|
||||
//} else {
|
||||
// pageProtect(ptr, bytes, PAGE_EXECUTE_READ, &errfunc);
|
||||
//}
|
||||
#else
|
||||
pageProtect(ptr, bytes, PAGE_EXECUTE_READ, &errfunc);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user