Add open_dir
This commit is contained in:
parent
cf7852bb94
commit
68b4a45db8
21
src/main.rs
21
src/main.rs
@ -58,6 +58,27 @@ impl vfs_rpc::Server for Serv {
|
||||
}
|
||||
}
|
||||
|
||||
fn open_dir(&self, path: &Path) -> Result<(u64, u64), ()> {
|
||||
if !path.is_absolute() {
|
||||
return Err(());
|
||||
}
|
||||
let (mount_path, (fs_pid, mount_id)) = self
|
||||
.mount_list
|
||||
.read()
|
||||
.iter()
|
||||
.filter(|(mount_path, _)| path.starts_with(mount_path))
|
||||
.max_by_key(|(mount_path, _)| mount_path.components().count())
|
||||
.map(|(a, b)| (a.clone(), *b))
|
||||
.unwrap();
|
||||
let (override_pid, fd) =
|
||||
fs_rpc::Client::new(fs_pid).open_dir(path.strip_prefix(mount_path).unwrap(), mount_id)?;
|
||||
if let Some(override_pid) = override_pid {
|
||||
Ok((override_pid, fd))
|
||||
} else {
|
||||
Ok((fs_pid, fd))
|
||||
}
|
||||
}
|
||||
|
||||
fn unmount(&self, path: &Path) -> Result<(), ()> {
|
||||
if self.mount_list.write().remove(path).is_none() {
|
||||
Err(())
|
||||
|
218
vfs_rpc/rustc-ice-2024-09-25T19_44_40-80717.txt
Normal file
218
vfs_rpc/rustc-ice-2024-09-25T19_44_40-80717.txt
Normal file
@ -0,0 +1,218 @@
|
||||
thread 'rustc' panicked at compiler/rustc_serialize/src/opaque.rs:295:9:
|
||||
MemDecoder exhausted
|
||||
stack backtrace:
|
||||
0: 0x71e08bf2635a - trace
|
||||
at /home/pterpstra/projects/rust_os_port/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
|
||||
1: 0x71e08bf2635a - trace_unsynchronized<std::backtrace::{impl#4}::create::{closure_env#0}>
|
||||
at /home/pterpstra/projects/rust_os_port/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
|
||||
2: 0x71e08bf2635a - create
|
||||
at /home/pterpstra/projects/rust_os_port/library/std/src/backtrace.rs:331:13
|
||||
3: 0x71e08bf262b5 - std::backtrace::Backtrace::force_capture::ha074ceedc5d65fd7
|
||||
at /home/pterpstra/projects/rust_os_port/library/std/src/backtrace.rs:312:9
|
||||
4: 0x71e08c9b8b9c - {closure#0}
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_driver_impl/src/lib.rs:1447:25
|
||||
5: 0x71e08c9b8b9c - call<(&(dyn core::ops::function::Fn<(&std::panic::PanicHookInfo), Output=()> + core::marker::Send + core::marker::Sync), &std::panic::PanicHookInfo), rustc_driver_impl::install_ice_hook::{closure_env#0}, alloc::alloc::Global>
|
||||
at /home/pterpstra/projects/rust_os_port/library/alloc/src/boxed.rs:2467:9
|
||||
6: 0x71e08bf0d9a3 - rust_panic_with_hook
|
||||
at /home/pterpstra/projects/rust_os_port/library/std/src/panicking.rs:809:13
|
||||
7: 0x71e08bf1c323 - {closure#0}
|
||||
at /home/pterpstra/projects/rust_os_port/library/std/src/panicking.rs:667:13
|
||||
8: 0x71e08bf1c2a9 - std::sys::backtrace::__rust_end_short_backtrace::hdc6f8fe2dc27ab3c
|
||||
at /home/pterpstra/projects/rust_os_port/library/std/src/sys/backtrace.rs:170:18
|
||||
9: 0x71e08bf0d4e7 - begin_panic_handler
|
||||
at /home/pterpstra/projects/rust_os_port/library/std/src/panicking.rs:665:5
|
||||
10: 0x71e08bef6870 - panic_fmt
|
||||
at /home/pterpstra/projects/rust_os_port/library/core/src/panicking.rs:74:14
|
||||
11: 0x71e08c940b0b - decoder_exhausted
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_serialize/src/opaque.rs:295:9
|
||||
12: 0x71e08f0c7393 - read_u8
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_serialize/src/opaque.rs:357:13
|
||||
13: 0x71e08f0c7393 - read_u8
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_middle/src/ty/codec.rs:474:17
|
||||
14: 0x71e08f0c7393 - read_bool<rustc_metadata::rmeta::decoder::DecodeContext>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_serialize/src/serialize.rs:109:21
|
||||
15: 0x71e08f0c7393 - decode<rustc_metadata::rmeta::decoder::DecodeContext>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_serialize/src/serialize.rs:174:21
|
||||
16: 0x71e08f09e722 - decode
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_metadata/src/rmeta/mod.rs:243:29
|
||||
17: 0x71e08f05c328 - decode<rustc_metadata::rmeta::CrateRoot, &rustc_metadata::rmeta::decoder::MetadataBlob>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_metadata/src/rmeta/decoder.rs:270:9
|
||||
18: 0x71e08f05c328 - get_root
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_metadata/src/rmeta/decoder.rs:743:9
|
||||
19: 0x71e08f07d819 - load
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_metadata/src/creader.rs:634:20
|
||||
20: 0x71e08f07a975 - maybe_resolve_crate
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_metadata/src/creader.rs:587:19
|
||||
21: 0x71e08f07fe5e - maybe_process_path_extern
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_metadata/src/creader.rs:1099:9
|
||||
22: 0x71e08de8e79e - {closure#2}
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_resolve/src/lib.rs:2111:43
|
||||
23: 0x71e08de8e79e - crate_loader<core::option::Option<rustc_span::def_id::CrateNum>, rustc_resolve::{impl#22}::extern_prelude_get::{closure#0}::{closure_env#2}>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_resolve/src/lib.rs:1678:9
|
||||
24: 0x71e08dece220 - {closure#0}
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_resolve/src/lib.rs:2111:21
|
||||
25: 0x71e08dece220 - and_then<rustc_resolve::ExternPreludeEntry, rustc_data_structures::intern::Interned<rustc_resolve::NameBindingData>, rustc_resolve::{impl#22}::extern_prelude_get::{closure_env#0}>
|
||||
at /home/pterpstra/projects/rust_os_port/library/core/src/option.rs:1442:24
|
||||
26: 0x71e08dece220 - extern_prelude_get
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_resolve/src/lib.rs:2092:23
|
||||
27: 0x71e08de89671 - {closure#0}
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_resolve/src/ident.rs:574:31
|
||||
28: 0x71e08de89671 - visit_scopes<core::result::Result<rustc_data_structures::intern::Interned<rustc_resolve::NameBindingData>, rustc_resolve::Determinacy>, rustc_resolve::ident::{impl#1}::early_resolve_ident_in_lexical_scope::{closure_env#0}>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_resolve/src/ident.rs:147:50
|
||||
29: 0x71e08ded1eba - early_resolve_ident_in_lexical_scope
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_resolve/src/ident.rs:431:28
|
||||
30: 0x71e08deb581a - resolve_path_with_ribs
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_resolve/src/ident.rs:1604:17
|
||||
31: 0x71e08ded586d - maybe_resolve_path
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_resolve/src/ident.rs:1442:9
|
||||
32: 0x71e08debe062 - resolve_import
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_resolve/src/imports.rs:775:28
|
||||
33: 0x71e08debe062 - resolve_imports
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_resolve/src/imports.rs:514:50
|
||||
34: 0x71e08debe062 - resolve_imports
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_resolve/src/macros.rs:255:9
|
||||
35: 0x71e08f1bf47b - resolve_imports
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_expand/src/expand.rs:568:13
|
||||
36: 0x71e08f1bf47b - fully_expand_fragment
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_expand/src/expand.rs:434:9
|
||||
37: 0x71e08f1bf073 - expand_crate
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_expand/src/expand.rs:417:21
|
||||
38: 0x71e08cbb328e - {closure#2}
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_interface/src/passes.rs:210:50
|
||||
39: 0x71e08cbb328e - run<rustc_ast::ast::Crate, rustc_interface::passes::configure_and_expand::{closure#1}::{closure_env#2}>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_data_structures/src/profiling.rs:753:9
|
||||
40: 0x71e08cbb328e - time<rustc_ast::ast::Crate, rustc_interface::passes::configure_and_expand::{closure#1}::{closure_env#2}>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_session/src/utils.rs:16:9
|
||||
41: 0x71e08cbb328e - {closure#1}
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_interface/src/passes.rs:210:21
|
||||
42: 0x71e08cbb328e - run<rustc_ast::ast::Crate, rustc_interface::passes::configure_and_expand::{closure_env#1}>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_data_structures/src/profiling.rs:753:9
|
||||
43: 0x71e08cbb328e - time<rustc_ast::ast::Crate, rustc_interface::passes::configure_and_expand::{closure_env#1}>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_session/src/utils.rs:16:9
|
||||
44: 0x71e08cb92a6d - configure_and_expand
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_interface/src/passes.rs:160:13
|
||||
45: 0x71e08cb92a6d - resolver_for_lowering_raw
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_interface/src/passes.rs:554:17
|
||||
46: 0x71e08e29ceea - {closure#0}
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_query_impl/src/plumbing.rs:283:9
|
||||
47: 0x71e08e29ceea - __rust_begin_short_backtrace<rustc_query_impl::query_impl::resolver_for_lowering_raw::dynamic_query::{closure#2}::{closure_env#0}, rustc_middle::query::erase::Erased<[u8; 16]>>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_query_impl/src/plumbing.rs:548:18
|
||||
48: 0x71e08e46390d - {closure#2}
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_query_impl/src/plumbing.rs:622:25
|
||||
49: 0x71e08e46390d - call_once<rustc_query_impl::query_impl::resolver_for_lowering_raw::dynamic_query::{closure_env#2}, (rustc_middle::ty::context::TyCtxt, ())>
|
||||
at /home/pterpstra/projects/rust_os_port/library/core/src/ops/function.rs:250:5
|
||||
50: 0x71e08e43581e - compute<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 16]>>, false, false, false>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_query_impl/src/lib.rs:110:9
|
||||
51: 0x71e08e43581e - {closure#0}<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 16]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_query_system/src/query/plumbing.rs:478:72
|
||||
52: 0x71e08e43581e - {closure#0}<rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 16]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt>, rustc_middle::query::erase::Erased<[u8; 16]>>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_middle/src/ty/context/tls.rs:82:9
|
||||
53: 0x71e08e43581e - try_with<core::cell::Cell<*const ()>, rustc_middle::ty::context::tls::enter_context::{closure_env#0}<rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 16]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt>, rustc_middle::query::erase::Erased<[u8; 16]>>, rustc_middle::query::erase::Erased<[u8; 16]>>
|
||||
at /home/pterpstra/projects/rust_os_port/library/std/src/thread/local.rs:283:12
|
||||
54: 0x71e08e43581e - with<core::cell::Cell<*const ()>, rustc_middle::ty::context::tls::enter_context::{closure_env#0}<rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 16]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt>, rustc_middle::query::erase::Erased<[u8; 16]>>, rustc_middle::query::erase::Erased<[u8; 16]>>
|
||||
at /home/pterpstra/projects/rust_os_port/library/std/src/thread/local.rs:260:9
|
||||
55: 0x71e08e314916 - enter_context<rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 16]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt>, rustc_middle::query::erase::Erased<[u8; 16]>>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_middle/src/ty/context/tls.rs:79:5
|
||||
56: 0x71e08e314916 - {closure#0}<rustc_middle::query::erase::Erased<[u8; 16]>, rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 16]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt>>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_query_impl/src/plumbing.rs:151:13
|
||||
57: 0x71e08e314916 - {closure#0}<rustc_query_impl::plumbing::{impl#3}::start_query::{closure_env#0}<rustc_middle::query::erase::Erased<[u8; 16]>, rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 16]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt>>, rustc_middle::query::erase::Erased<[u8; 16]>>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_middle/src/ty/context/tls.rs:134:9
|
||||
58: 0x71e08e314916 - {closure#0}<rustc_middle::ty::context::tls::with_related_context::{closure_env#0}<rustc_query_impl::plumbing::{impl#3}::start_query::{closure_env#0}<rustc_middle::query::erase::Erased<[u8; 16]>, rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 16]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt>>, rustc_middle::query::erase::Erased<[u8; 16]>>, rustc_middle::query::erase::Erased<[u8; 16]>>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_middle/src/ty/context/tls.rs:112:36
|
||||
59: 0x71e08e314916 - with_context_opt<rustc_middle::ty::context::tls::with_context::{closure_env#0}<rustc_middle::ty::context::tls::with_related_context::{closure_env#0}<rustc_query_impl::plumbing::{impl#3}::start_query::{closure_env#0}<rustc_middle::query::erase::Erased<[u8; 16]>, rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 16]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt>>, rustc_middle::query::erase::Erased<[u8; 16]>>, rustc_middle::query::erase::Erased<[u8; 16]>>, rustc_middle::query::erase::Erased<[u8; 16]>>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_middle/src/ty/context/tls.rs:101:18
|
||||
60: 0x71e08e314916 - with_context<rustc_middle::ty::context::tls::with_related_context::{closure_env#0}<rustc_query_impl::plumbing::{impl#3}::start_query::{closure_env#0}<rustc_middle::query::erase::Erased<[u8; 16]>, rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 16]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt>>, rustc_middle::query::erase::Erased<[u8; 16]>>, rustc_middle::query::erase::Erased<[u8; 16]>>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_middle/src/ty/context/tls.rs:112:5
|
||||
61: 0x71e08e314916 - with_related_context<rustc_query_impl::plumbing::{impl#3}::start_query::{closure_env#0}<rustc_middle::query::erase::Erased<[u8; 16]>, rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 16]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt>>, rustc_middle::query::erase::Erased<[u8; 16]>>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_middle/src/ty/context/tls.rs:125:5
|
||||
62: 0x71e08e314916 - start_query<rustc_middle::query::erase::Erased<[u8; 16]>, rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 16]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt>>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_query_impl/src/plumbing.rs:136:9
|
||||
63: 0x71e08e314916 - execute_job_non_incr<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 16]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_query_system/src/query/plumbing.rs:478:18
|
||||
64: 0x71e08e314916 - execute_job<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 16]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_query_system/src/query/plumbing.rs:414:9
|
||||
65: 0x71e08e314916 - try_execute_query<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 16]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_query_system/src/query/plumbing.rs:357:13
|
||||
66: 0x71e08e464044 - {closure#0}<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 16]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_query_system/src/query/plumbing.rs:809:32
|
||||
67: 0x71e08e464044 - maybe_grow<rustc_middle::query::erase::Erased<[u8; 16]>, rustc_query_system::query::plumbing::get_query_non_incr::{closure_env#0}<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 16]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt>>
|
||||
at /home/pterpstra/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/stacker-0.1.17/src/lib.rs:55:9
|
||||
68: 0x71e08e464044 - ensure_sufficient_stack<rustc_middle::query::erase::Erased<[u8; 16]>, rustc_query_system::query::plumbing::get_query_non_incr::{closure_env#0}<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 16]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt>>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_data_structures/src/stack.rs:17:5
|
||||
69: 0x71e08e464044 - get_query_non_incr<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 16]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_query_system/src/query/plumbing.rs:809:5
|
||||
70: 0x71e08e464044 - __rust_end_short_backtrace
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_query_impl/src/plumbing.rs:598:26
|
||||
71: 0x71e08f5f17e4 - query_get_at<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 16]>>>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_middle/src/query/plumbing.rs:143:17
|
||||
72: 0x71e08f5f17e4 - resolver_for_lowering_raw
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_middle/src/query/plumbing.rs:422:31
|
||||
73: 0x71e08f5f17e4 - resolver_for_lowering_raw
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_middle/src/query/plumbing.rs:413:17
|
||||
74: 0x71e08f5f17e4 - resolver_for_lowering
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_middle/src/ty/context.rs:3158:9
|
||||
75: 0x71e08c9df3d9 - {closure#3}
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_driver_impl/src/lib.rs:432:48
|
||||
76: 0x71e08c9df3d9 - {closure#1}<rustc_driver_impl::run_compiler::{closure#0}::{closure#1}::{closure_env#3}, &rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::sync::Arc<rustc_ast::ast::Crate, alloc::alloc::Global>)>>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_middle/src/ty/context.rs:1324:37
|
||||
77: 0x71e08c9df3d9 - {closure#0}<rustc_middle::ty::context::{impl#19}::enter::{closure_env#1}<rustc_driver_impl::run_compiler::{closure#0}::{closure#1}::{closure_env#3}, &rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::sync::Arc<rustc_ast::ast::Crate, alloc::alloc::Global>)>>, &rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::sync::Arc<rustc_ast::ast::Crate, alloc::alloc::Global>)>>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_middle/src/ty/context/tls.rs:82:9
|
||||
78: 0x71e08c9df3d9 - try_with<core::cell::Cell<*const ()>, rustc_middle::ty::context::tls::enter_context::{closure_env#0}<rustc_middle::ty::context::{impl#19}::enter::{closure_env#1}<rustc_driver_impl::run_compiler::{closure#0}::{closure#1}::{closure_env#3}, &rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::sync::Arc<rustc_ast::ast::Crate, alloc::alloc::Global>)>>, &rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::sync::Arc<rustc_ast::ast::Crate, alloc::alloc::Global>)>>, &rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::sync::Arc<rustc_ast::ast::Crate, alloc::alloc::Global>)>>
|
||||
at /home/pterpstra/projects/rust_os_port/library/std/src/thread/local.rs:283:12
|
||||
79: 0x71e08c9df3d9 - with<core::cell::Cell<*const ()>, rustc_middle::ty::context::tls::enter_context::{closure_env#0}<rustc_middle::ty::context::{impl#19}::enter::{closure_env#1}<rustc_driver_impl::run_compiler::{closure#0}::{closure#1}::{closure_env#3}, &rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::sync::Arc<rustc_ast::ast::Crate, alloc::alloc::Global>)>>, &rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::sync::Arc<rustc_ast::ast::Crate, alloc::alloc::Global>)>>, &rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::sync::Arc<rustc_ast::ast::Crate, alloc::alloc::Global>)>>
|
||||
at /home/pterpstra/projects/rust_os_port/library/std/src/thread/local.rs:260:9
|
||||
80: 0x71e08c9dbbe6 - enter_context<rustc_middle::ty::context::{impl#19}::enter::{closure_env#1}<rustc_driver_impl::run_compiler::{closure#0}::{closure#1}::{closure_env#3}, &rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::sync::Arc<rustc_ast::ast::Crate, alloc::alloc::Global>)>>, &rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::sync::Arc<rustc_ast::ast::Crate, alloc::alloc::Global>)>>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_middle/src/ty/context/tls.rs:79:5
|
||||
81: 0x71e08c9dbbe6 - enter<rustc_driver_impl::run_compiler::{closure#0}::{closure#1}::{closure_env#3}, &rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::sync::Arc<rustc_ast::ast::Crate, alloc::alloc::Global>)>>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_middle/src/ty/context.rs:1324:9
|
||||
82: 0x71e08c958b64 - {closure#1}
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_driver_impl/src/lib.rs:432:13
|
||||
83: 0x71e08c958b64 - enter<rustc_driver_impl::run_compiler::{closure#0}::{closure_env#1}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_span::ErrorGuaranteed>>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_interface/src/queries.rs:210:19
|
||||
84: 0x71e08c962a15 - {closure#0}
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_driver_impl/src/lib.rs:392:22
|
||||
85: 0x71e08c962a15 - {closure#1}<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure_env#0}>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_interface/src/interface.rs:504:27
|
||||
86: 0x71e08c962a15 - {closure#0}<rustc_interface::interface::run_compiler::{closure_env#1}<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure_env#0}>, core::result::Result<(), rustc_span::ErrorGuaranteed>>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_interface/src/util.rs:157:13
|
||||
87: 0x71e08c962a15 - {closure#0}<rustc_interface::util::run_in_thread_pool_with_globals::{closure_env#0}<rustc_interface::interface::run_compiler::{closure_env#1}<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure_env#0}>, core::result::Result<(), rustc_span::ErrorGuaranteed>>, core::result::Result<(), rustc_span::ErrorGuaranteed>>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_interface/src/util.rs:107:21
|
||||
88: 0x71e08c962a15 - set<rustc_span::SessionGlobals, rustc_interface::util::run_in_thread_with_globals::{closure#0}::{closure#0}::{closure_env#0}<rustc_interface::util::run_in_thread_pool_with_globals::{closure_env#0}<rustc_interface::interface::run_compiler::{closure_env#1}<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure_env#0}>, core::result::Result<(), rustc_span::ErrorGuaranteed>>, core::result::Result<(), rustc_span::ErrorGuaranteed>>, core::result::Result<(), rustc_span::ErrorGuaranteed>>
|
||||
at /home/pterpstra/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/scoped-tls-1.0.1/src/lib.rs:137:9
|
||||
89: 0x71e08c95b815 - create_session_globals_then<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_interface::util::run_in_thread_with_globals::{closure#0}::{closure#0}::{closure_env#0}<rustc_interface::util::run_in_thread_pool_with_globals::{closure_env#0}<rustc_interface::interface::run_compiler::{closure_env#1}<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure_env#0}>, core::result::Result<(), rustc_span::ErrorGuaranteed>>, core::result::Result<(), rustc_span::ErrorGuaranteed>>>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_span/src/lib.rs:135:5
|
||||
90: 0x71e08c9ea2c6 - {closure#0}<rustc_interface::util::run_in_thread_pool_with_globals::{closure_env#0}<rustc_interface::interface::run_compiler::{closure_env#1}<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure_env#0}>, core::result::Result<(), rustc_span::ErrorGuaranteed>>, core::result::Result<(), rustc_span::ErrorGuaranteed>>
|
||||
at /home/pterpstra/projects/rust_os_port/compiler/rustc_interface/src/util.rs:106:17
|
||||
91: 0x71e08c9ea2c6 - __rust_begin_short_backtrace<rustc_interface::util::run_in_thread_with_globals::{closure#0}::{closure_env#0}<rustc_interface::util::run_in_thread_pool_with_globals::{closure_env#0}<rustc_interface::interface::run_compiler::{closure_env#1}<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure_env#0}>, core::result::Result<(), rustc_span::ErrorGuaranteed>>, core::result::Result<(), rustc_span::ErrorGuaranteed>>, core::result::Result<(), rustc_span::ErrorGuaranteed>>
|
||||
at /home/pterpstra/projects/rust_os_port/library/std/src/sys/backtrace.rs:154:18
|
||||
92: 0x71e08c9be7f0 - {closure#0}<rustc_interface::util::run_in_thread_with_globals::{closure#0}::{closure_env#0}<rustc_interface::util::run_in_thread_pool_with_globals::{closure_env#0}<rustc_interface::interface::run_compiler::{closure_env#1}<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure_env#0}>, core::result::Result<(), rustc_span::ErrorGuaranteed>>, core::result::Result<(), rustc_span::ErrorGuaranteed>>, core::result::Result<(), rustc_span::ErrorGuaranteed>>
|
||||
at /home/pterpstra/projects/rust_os_port/library/std/src/thread/mod.rs:522:17
|
||||
93: 0x71e08c9be7f0 - call_once<core::result::Result<(), rustc_span::ErrorGuaranteed>, std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<rustc_interface::util::run_in_thread_with_globals::{closure#0}::{closure_env#0}<rustc_interface::util::run_in_thread_pool_with_globals::{closure_env#0}<rustc_interface::interface::run_compiler::{closure_env#1}<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure_env#0}>, core::result::Result<(), rustc_span::ErrorGuaranteed>>, core::result::Result<(), rustc_span::ErrorGuaranteed>>, core::result::Result<(), rustc_span::ErrorGuaranteed>>>
|
||||
at /home/pterpstra/projects/rust_os_port/library/core/src/panic/unwind_safe.rs:272:9
|
||||
94: 0x71e08c9be7f0 - do_call<core::panic::unwind_safe::AssertUnwindSafe<std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<rustc_interface::util::run_in_thread_with_globals::{closure#0}::{closure_env#0}<rustc_interface::util::run_in_thread_pool_with_globals::{closure_env#0}<rustc_interface::interface::run_compiler::{closure_env#1}<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure_env#0}>, core::result::Result<(), rustc_span::ErrorGuaranteed>>, core::result::Result<(), rustc_span::ErrorGuaranteed>>, core::result::Result<(), rustc_span::ErrorGuaranteed>>>, core::result::Result<(), rustc_span::ErrorGuaranteed>>
|
||||
at /home/pterpstra/projects/rust_os_port/library/std/src/panicking.rs:557:40
|
||||
95: 0x71e08c9be7f0 - try<core::result::Result<(), rustc_span::ErrorGuaranteed>, core::panic::unwind_safe::AssertUnwindSafe<std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<rustc_interface::util::run_in_thread_with_globals::{closure#0}::{closure_env#0}<rustc_interface::util::run_in_thread_pool_with_globals::{closure_env#0}<rustc_interface::interface::run_compiler::{closure_env#1}<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure_env#0}>, core::result::Result<(), rustc_span::ErrorGuaranteed>>, core::result::Result<(), rustc_span::ErrorGuaranteed>>, core::result::Result<(), rustc_span::ErrorGuaranteed>>>>
|
||||
at /home/pterpstra/projects/rust_os_port/library/std/src/panicking.rs:520:19
|
||||
96: 0x71e08c9be7f0 - catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<std::thread::{impl#0}::spawn_unchecked_::{closure#1}::{closure_env#0}<rustc_interface::util::run_in_thread_with_globals::{closure#0}::{closure_env#0}<rustc_interface::util::run_in_thread_pool_with_globals::{closure_env#0}<rustc_interface::interface::run_compiler::{closure_env#1}<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure_env#0}>, core::result::Result<(), rustc_span::ErrorGuaranteed>>, core::result::Result<(), rustc_span::ErrorGuaranteed>>, core::result::Result<(), rustc_span::ErrorGuaranteed>>>, core::result::Result<(), rustc_span::ErrorGuaranteed>>
|
||||
at /home/pterpstra/projects/rust_os_port/library/std/src/panic.rs:348:14
|
||||
97: 0x71e08c9be7f0 - {closure#1}<rustc_interface::util::run_in_thread_with_globals::{closure#0}::{closure_env#0}<rustc_interface::util::run_in_thread_pool_with_globals::{closure_env#0}<rustc_interface::interface::run_compiler::{closure_env#1}<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure_env#0}>, core::result::Result<(), rustc_span::ErrorGuaranteed>>, core::result::Result<(), rustc_span::ErrorGuaranteed>>, core::result::Result<(), rustc_span::ErrorGuaranteed>>
|
||||
at /home/pterpstra/projects/rust_os_port/library/std/src/thread/mod.rs:521:30
|
||||
98: 0x71e08c9be7f0 - call_once<std::thread::{impl#0}::spawn_unchecked_::{closure_env#1}<rustc_interface::util::run_in_thread_with_globals::{closure#0}::{closure_env#0}<rustc_interface::util::run_in_thread_pool_with_globals::{closure_env#0}<rustc_interface::interface::run_compiler::{closure_env#1}<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure_env#0}>, core::result::Result<(), rustc_span::ErrorGuaranteed>>, core::result::Result<(), rustc_span::ErrorGuaranteed>>, core::result::Result<(), rustc_span::ErrorGuaranteed>>, ()>
|
||||
at /home/pterpstra/projects/rust_os_port/library/core/src/ops/function.rs:250:5
|
||||
99: 0x71e08bf28c9d - call_once<(), dyn core::ops::function::FnOnce<(), Output=()>, alloc::alloc::Global>
|
||||
at /home/pterpstra/projects/rust_os_port/library/alloc/src/boxed.rs:2453:9
|
||||
100: 0x71e08bf28c9d - call_once<(), alloc::boxed::Box<dyn core::ops::function::FnOnce<(), Output=()>, alloc::alloc::Global>, alloc::alloc::Global>
|
||||
at /home/pterpstra/projects/rust_os_port/library/alloc/src/boxed.rs:2453:9
|
||||
101: 0x71e08bf2d35a - std::sys::pal::unix::thread::Thread::new::thread_start::h04514edad82fb1d6
|
||||
at /home/pterpstra/projects/rust_os_port/library/std/src/sys/pal/unix/thread.rs:105:17
|
||||
102: 0x71e08bd3f39d - <unknown>
|
||||
103: 0x71e08bdc449c - <unknown>
|
||||
104: 0x0 - <unknown>
|
||||
|
||||
|
||||
rustc version: 1.83.0-dev
|
||||
platform: x86_64-unknown-linux-gnu
|
||||
|
||||
query stack during panic:
|
||||
#0 [resolver_for_lowering_raw] getting the resolver for lowering
|
||||
end of query stack
|
@ -18,6 +18,7 @@ pub trait Server: Send + Sync {
|
||||
fn unmount(&self, path: &Path) -> Result<(), ()>;
|
||||
fn set_stdio(&self, pid: u64, stdio: [Option<(u64, u64)>; 3]) -> Result<(), ()>;
|
||||
fn get_stdio(&self, from: u64) -> [Option<(u64, u64)>; 3];
|
||||
fn open_dir(&self, path: &Path) -> Result<(u64, u64), ()>;
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
@ -93,6 +94,13 @@ impl Client {
|
||||
)
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
pub fn open_dir(self, path: &Path) -> Result<(u64, u64), ()> {
|
||||
postcard::from_bytes(
|
||||
&rpc::send_call(self.0, PROTO, 6, &postcard::to_stdvec(path).unwrap()).get_return(),
|
||||
)
|
||||
.unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn register_server(server: Box<dyn Server>) {
|
||||
@ -131,5 +139,9 @@ fn callback(call: IncomingCall) {
|
||||
} else if call.func == 5 {
|
||||
let ret = postcard::to_stdvec(&server.get_stdio(call.from)).unwrap();
|
||||
call.send_return(&ret);
|
||||
} else if call.func == 6 {
|
||||
let path = postcard::from_bytes(call.args()).unwrap();
|
||||
let ret = postcard::to_stdvec(&server.open_dir (path)).unwrap();
|
||||
call.send_return(&ret);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user