We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use serde::Serialize; #[derive(Serialize)] struct Node { k: Option<Box<dyn erased_serde::Serialize>>, } fn main() { std::thread::Builder::new() .stack_size(2 * 1024 * 1024) .name("test".to_string()) .spawn(move || { let mut node = None::<Box<dyn erased_serde::Serialize>>; for _ in 0..100 { node = Some(Box::new(Node { k: node })); } let json = serde_json::to_string(&node).unwrap(); println!("{json}"); }) .unwrap() .join() .unwrap(); }
Backtrace according to gdb
The text was updated successfully, but these errors were encountered:
Cleaner backtrace
use serde::Serialize; #[derive(Serialize)] struct Node<'a> { k: &'a dyn erased_serde::Serialize, } fn main() { std::thread::Builder::new() .stack_size(2 * 1024 * 1024) .name("test".to_string()) .spawn(move || { let mut node = Node { k: &() }; for _ in 0..100 { node = Node { k: Box::leak(Box::new(node)) }; } let json = serde_json::to_string(&node).unwrap(); println!("{json}"); }) .unwrap() .join() .unwrap(); }
Sorry, something went wrong.
No branches or pull requests
Backtrace according to gdb
The text was updated successfully, but these errors were encountered: