Skip to content

Commit

Permalink
Merge pull request wasmerio#5285 from wasmerio/fix/mkdir-rename-mkdir
Browse files Browse the repository at this point in the history
Fix handling of the root path in WasiFS resulting in a bad inode structure
  • Loading branch information
syrusakbary authored Dec 10, 2024
2 parents 28bb55c + 9abe189 commit a09ad41
Show file tree
Hide file tree
Showing 31 changed files with 584 additions and 183 deletions.
261 changes: 254 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ allow = [
# BOOST source license
# NOTE: not to be confused with business source license!
"BSL-1.0",
"Unicode-3.0",
]
# The confidence threshold for detecting a license from license text.
# The higher the value, the more closely the license text must be to the
Expand Down Expand Up @@ -138,7 +139,7 @@ exceptions = [
[[licenses.clarify]]
crate = "ring"
expression = "MIT AND ISC AND OpenSSL"
license-files = [ { path = "LICENSE", hash = 0xbd0eed23 } ]
license-files = [{ path = "LICENSE", hash = 0xbd0eed23 }]

[licenses.private]
# If true, ignores workspace crates that aren't published, or are only
Expand Down
3 changes: 0 additions & 3 deletions lib/config/rust-toolchain.toml

This file was deleted.

9 changes: 8 additions & 1 deletion lib/virtual-io/src/selector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,14 @@ impl Selector {
let mut events = mio::Events::with_capacity(128);
loop {
// Wait for an event to trigger
poll.poll(&mut events, None).unwrap();
if let Err(e) = poll.poll(&mut events, None) {
// This can happen when a debugger is attached
#[cfg(debug_assertions)]
if e.kind() == std::io::ErrorKind::Interrupted {
continue;
}
panic!("Unexpected error in selector poll loop: {e:?}");
}

// Loop through all the events while under a guard lock
let mut guard = engine.inner.lock().unwrap();
Expand Down
2 changes: 1 addition & 1 deletion lib/wasix/src/fs/fd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl Fd {
pub struct InodeVal {
pub stat: RwLock<Filestat>,
pub is_preopened: bool,
pub name: Cow<'static, str>,
pub name: RwLock<Cow<'static, str>>,
pub kind: RwLock<Kind>,
}

Expand Down
2 changes: 1 addition & 1 deletion lib/wasix/src/fs/fd_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ mod tests {
inner: Arc::new(InodeVal {
is_preopened: false,
kind: RwLock::new(Kind::Buffer { buffer: vec![] }),
name: Cow::Borrowed(""),
name: RwLock::new(Cow::Borrowed("")),
stat: RwLock::new(Default::default()),
}),
},
Expand Down
Loading

0 comments on commit a09ad41

Please sign in to comment.