Skip to content

Commit

Permalink
externref: Address review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
fitzgen committed Jun 15, 2020
1 parent 618c278 commit 5019c48
Show file tree
Hide file tree
Showing 17 changed files with 388 additions and 546 deletions.
265 changes: 133 additions & 132 deletions Cargo.lock

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,3 @@ maintenance = { status = "actively-developed" }
[[test]]
name = "host_segfault"
harness = false

[patch.crates-io]
backtrace = { git = "https://github.com/rust-lang/backtrace-rs.git" }
2 changes: 1 addition & 1 deletion crates/environ/src/cranelift.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ impl binemit::StackmapSink for StackMapSink {

impl StackMapSink {
fn finish(mut self) -> Vec<StackMapInformation> {
self.infos.sort_by_key(|info| info.code_offset);
self.infos.sort_unstable_by_key(|info| info.code_offset);
self.infos
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/jit/src/code_memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ impl CodeMemory {

if !m.is_empty() {
unsafe {
region::protect(m.as_mut_ptr(), m.len(), region::Protection::ReadExecute)
region::protect(m.as_mut_ptr(), m.len(), region::Protection::READ_EXECUTE)
}
.expect("unable to make memory readonly and executable");
}
Expand Down
4 changes: 2 additions & 2 deletions crates/jit/src/instantiate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ impl CompiledModule {
signatures.into_boxed_slice(),
host_state,
interrupts,
externref_activations_table,
stack_map_registry,
&*externref_activations_table as *const _ as *mut _,
&*stack_map_registry as *const _ as *mut _,
)
}

Expand Down
Loading

0 comments on commit 5019c48

Please sign in to comment.