Skip to content
New issue

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

toml-edit - stack overflow in testsuite. #653

Closed
plugwash opened this issue Nov 14, 2023 · 5 comments
Closed

toml-edit - stack overflow in testsuite. #653

plugwash opened this issue Nov 14, 2023 · 5 comments

Comments

@plugwash
Copy link

Hi,

I've been looking at updating the rust-toml-edit package in Debian, however when running the testsuite for the new version I get a stack overflow.

cargo test --test testsuite

thread 'stackoverflow::array_recursion_limit' has overflowed its stack
fatal runtime error: stack overflow

We are using rustc 1.70

If this was happening on some obscure architecture, I'd put it down to the weirdness of said architecture but this is happening on amd64, and it's happening even when none of our patches are applied.

Any advice would be appreciated.

@epage
Copy link
Member

epage commented Nov 14, 2023

That is strange considering it isn't overflowing in our test suite and we haven't heard from any users that it is overflowing.

That test is creating a 300-levels deep TOML array and making sure we hit our 128-levels deep recursion limit.

What is the old and new version being tested?

@plugwash
Copy link
Author

plugwash commented Nov 14, 2023

The update I was working from was from toml-edit 0.19.14 to 0.21.0

However, investigating in more detail, it seems that we were not previously running these tests. We have a patch to disable tests that either we do not carry the dependencies for, or that require test data that is not included in the crates.io releases. When I updated said patch for the new upstream version, some tests that were previously disabled ended up enabled.

When I remove our patches I can reproduce the issue with 0.19.14 as well.

Also I can only reproduce this in debug mode not release mode.

I just took a look at your CI and it seems your CI is testing toml_edit with --no-default-features and with --all-features, but never testing the default configuration. The test in question is skipped in the no-default features configuration because it has feature requirements specified in Cargo.toml and is skipped in the all features configuration because it has an explicit cfg disabling it in that case.

Edit: seems I was wrong, it seems default features for toml_edit are tested in the same workflow item as default features for "toml"

@epage
Copy link
Member

epage commented Nov 14, 2023

Also I can only reproduce this in debug mode not release mode.

We only test in debug mode, so thats not helping.

That is confusing.

@epage
Copy link
Member

epage commented Mar 8, 2024

Could you be enabling the unbounded feature?

Could you provide a reproduction case?

@epage
Copy link
Member

epage commented Mar 18, 2024

Without a reproduction case, I'm closing

@epage epage closed this as not planned Won't fix, can't repro, duplicate, stale Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants