Stream: beginners

Topic: Test failures in gen_abilities after Json updates


view this post on Zulip David Smith (May 17 2023 at 18:50):

I'm seeing stack overflow errors, e.g.,

thread 'gen_abilities::encode_derived_generic_record_with_different_field_types' has overflowed its stack
fatal runtime error: stack overflow

They started with a6bda6e, updates for builtin Json. I see this passed CI, so I'm wondering what could be causing my local failures.

view this post on Zulip Brendan Hansknecht (May 17 2023 at 18:54):

Might only pass in release

view this post on Zulip Brendan Hansknecht (May 17 2023 at 18:55):

CI runs release

view this post on Zulip Brendan Hansknecht (May 17 2023 at 18:55):

Stack overflows are much more common in debug due to the lack of optimizations

view this post on Zulip Ayaz Hafiz (May 17 2023 at 18:55):

Yeah, sorry about this. Feel free to add a #[cfg(not(debug_assertions))] attribute to that test.

view this post on Zulip David Smith (May 17 2023 at 19:18):

Np, thanks for the background! The tests did indeed pass locally in release. I'll look into adding these attributes.

view this post on Zulip David Smith (May 17 2023 at 20:36):

Would one of you mind reviewing 5422, when you have a chance?


Last updated: Jul 06 2025 at 12:14 UTC