8000 crates/sandbox2: fix overflowing small stack for min commands by twitchyliquid64 · Pull Request #98 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions crates/sandbox2/src/listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ impl<C: Channel + Send> Listener<C> {
let channel_addr = &mut *channel as *mut C as usize;

let rootfs = rootfs.into();
let thread = thread::spawn(move || {
let channel: &mut C = unsafe { &mut *(channel_addr as *mut C) };
Self::run(listener, channel, shutdown_clone, rootfs);
});
let thread = thread::Builder::new()
.stack_size(8 * 1024 * 1024)
.spawn(move || {
let channel: &mut C = unsafe { &mut *(channel_addr as *mut C) };
Self::run(listener, channel, shutdown_clone, rootfs);
})?;

Ok(Self {
shutdown,
Expand Down
0