Przeglądaj źródła

Merge pull request #202 from SChernykh/fix-crash

Fix illegal instruction crash on some ARM systems
tevador 5 lat temu
rodzic
commit
4aae0d834d
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4 0
      src/jit_compiler_a64.cpp

+ 4 - 0
src/jit_compiler_a64.cpp

@@ -95,6 +95,10 @@ JitCompilerA64::JitCompilerA64()
 {
 	memset(reg_changed_offset, 0, sizeof(reg_changed_offset));
 	memcpy(code, (void*) randomx_program_aarch64, CodeSize);
+
+#ifdef __GNUC__
+	__builtin___clear_cache(reinterpret_cast<char*>(code), reinterpret_cast<char*>(code + CodeSize));
+#endif
 }
 
 JitCompilerA64::~JitCompilerA64()