mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-12-23 21:57:46 +00:00
Merge pull request #5731
c393e82
CryptonightR_JIT: fix return value on error (selene-kovri)
This commit is contained in:
commit
8956e90c63
1 changed files with 3 additions and 3 deletions
|
@ -63,7 +63,7 @@ int v4_generate_JIT_code(const struct V4_Instruction* code, v4_random_math_JIT_f
|
|||
|
||||
#if !(defined(_MSC_VER) || defined(__MINGW32__))
|
||||
if (mprotect((void*)buf, buf_size, PROT_READ | PROT_WRITE))
|
||||
return 1;
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
APPEND_CODE(prologue, sizeof(prologue));
|
||||
|
@ -111,13 +111,13 @@ int v4_generate_JIT_code(const struct V4_Instruction* code, v4_random_math_JIT_f
|
|||
|
||||
#if !(defined(_MSC_VER) || defined(__MINGW32__))
|
||||
if (mprotect((void*)buf, buf_size, PROT_READ | PROT_EXEC))
|
||||
return 1;
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
__builtin___clear_cache((char*)buf, (char*)JIT_code);
|
||||
|
||||
return 0;
|
||||
#else
|
||||
return 1;
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue