Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #5731
Browse files Browse the repository at this point in the history
c393e82 CryptonightR_JIT: fix return value on error (selene-kovri)
  • Loading branch information
luigi1111 committed Aug 21, 2019
2 parents 65e9371 + c393e82 commit 8956e90
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/crypto/CryptonightR_JIT.c
Expand Up @@ -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));
Expand Down Expand Up @@ -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
}

0 comments on commit 8956e90

Please sign in to comment.