the.bay.news

How to prevent stack overflow when dropping deep structures?

The Rust Programming Language Forum
How to prevent stack overflow when dropping deep structures?
Hi, I'm porting tests of custom JSON parser from another language to Rust. The original library contains test with 10 million nested JSON arrays. I can parse it in Rust easily. But unfortunately the problem happens when it goes out of scope and it should be dropped. Instead of dropping, my program runs out of stack space. I also tried using serde_json representation and it's the same: fn main() { let mut json = serde_json::Value::Bool(true); for i in 0..10_000_000 { json = ser...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.