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
I tried this code:
let a=Box::new([0;10000000]);
I expected that it would allocate array on the heap but instead, it panicked : thread 'main' has overflowed its stack
thread 'main' has overflowed its stack
rustc --version --verbose:
rustc --version --verbose
rustc 1.68.0 (2c8cc3432 2023-03-06) binary: rustc commit-hash: 2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74 commit-date: 2023-03-06 host: x86_64-pc-windows-msvc release: 1.68.0 LLVM version: 15.0.6
thread 'main' has overflowed its stack error: process didn't exit successfully: `target\debug\rusty-image-resizer.exe` (exit code: 0xc00000fd, STATUS_STACK_OVERFLOW)
The text was updated successfully, but these errors were encountered:
Thanks for the report, but I'll close it as a duplicate of #53827
Sorry, something went wrong.
But the recommend workaround is to use vec![0; 100000].into_boxed_slice().try_into().unwrap() instead.
vec![0; 100000].into_boxed_slice().try_into().unwrap()
No branches or pull requests
I tried this code:
I expected that it would allocate array on the heap but instead, it panicked :
thread 'main' has overflowed its stack
Meta
rustc --version --verbose
:Backtrace
The text was updated successfully, but these errors were encountered: