You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm not sure if it is a optimization bug of rustc.
I've noticed that when running test cases for toml crate (https://github.com/toml-rs/toml), I get a stack overflow when using certain specific optimization level (-C opt-level=0), but for other opt-level, the test cases will pass.
I am using cargo version: cargo 1.77.0-nightly (7bb7b5395 2024-01-20), the detailed discussion can be found in: toml-rs/toml#702
The developer have fixed the overflow by changing the limit value to a smaller value, but I still want to confirm why it doesn't overflow with rustc optimization turned on, but does overflow without it?
This is the fixing patch (changing the LIMIT to a smaller value):
The text was updated successfully, but these errors were encountered:
The developer have fixed the overflow by changing the limit value to a smaller value, but I still want to confirm why it doesn't overflow with rustc optimization turned on, but does overflow without it?
The tests in question involve a recursive case, and reducing the amount of stack memory used is a legal optimization of Rust code, as the exact amount of stack memory used is not considered part of Rust's program semantics.
Hi, I'm not sure if it is a optimization bug of rustc.
I've noticed that when running test cases for toml crate (https://github.com/toml-rs/toml), I get a stack overflow when using certain specific optimization level (
-C opt-level=0
), but for other opt-level, the test cases will pass.I am using cargo version:
cargo 1.77.0-nightly (7bb7b5395 2024-01-20)
, the detailed discussion can be found in: toml-rs/toml#702The developer have fixed the overflow by changing the
limit
value to a smaller value, but I still want to confirm why it doesn't overflow with rustc optimization turned on, but does overflow without it?This is the fixing patch (changing the LIMIT to a smaller value):
The text was updated successfully, but these errors were encountered: