Mark JIT memory as readable in addition to executable.

While we don't currently need this, we will for jump tables and constant
pools.
This commit is contained in:
Dan Gohman
2018-09-19 18:44:23 -07:00
parent d514cec065
commit 6e9c33a1ef
2 changed files with 5 additions and 5 deletions

View File

@@ -406,7 +406,7 @@ impl<'simple_jit_backend> Backend for SimpleJITBackend {
fn publish(&mut self) {
// Now that we're done patching, prepare the memory for execution!
self.readonly_memory.set_readonly();
self.code_memory.set_executable();
self.code_memory.set_readable_and_executable();
}
/// SimpleJIT emits code and data into memory as it processes them, so it