Repository: rust
Issue: Panic when setting RUST_MIN_STACK incorrectly
Labels: I-ICE,T-compiler,regression-from-stable-to-stable,C-bug

<!--
Thank you for finding an Internal Compiler Error! 🧊  If possible, try to provide
a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for
how to create smaller examples.
http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/
-->

This has been fixed in nightly, but was an unexpected panic to encounter on stable. The weird number format is thanks to CircleCI/YAML mangling, I would probably expect this to fail but with at least the error message as seen in nightly. 

### Code

```Shell
cargo new bad-env
cd bad-env
RUST_MIN_STACK=1e+07 cargo +stable build
```


### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.79.0 (129f3b996 2024-06-10)
```

### Error output

```
<output>
```

<!--
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
environment. E.g. `RUST_BACKTRACE=1 cargo build`.
-->
<details><summary><strong>Backtrace</strong></summary>
<p>

```
Caused by:
  process didn't exit successfully: `/Users/jeffrey/.rustup/toolchains/stable-aarch64-apple-darwin/bin/rustc - --crate-name ___ --print=file-names -C link-arg=--ld-path=/Users/jeffrey/workspace/Build/sold/build/ld64 --crate-type bin --cra
te-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg` (exit status: 101)
  --- stderr
  thread 'main' panicked at compiler/rustc_interface/src/util.rs:63:48:
  called `Result::unwrap()` on an `Err` value: ParseIntError { kind: InvalidDigit }
  stack backtrace:
     0:        0x1010ed750 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1f3776e0b5c7517d
     1:        0x101130470 - core::fmt::write::heedef092c8c0962e
     2:        0x1010e3a1c - std::io::Write::write_fmt::h7178e8e2ea928914
     3:        0x1010ed5a8 - std::sys_common::backtrace::print::h417292deb95532ed
     4:        0x1010efb2c - std::panicking::default_hook::{{closure}}::h0cb68f1228c4613a
     5:        0x1010ef820 - std::panicking::default_hook::h24535936bc1f51de
     6:        0x10a5bb828 - <alloc[d07bc629de031c28]::boxed::Box<rustc_driver_impl[17630cf877ef70bb]::install_ice_hook::{closure#0}> as core[fca7800875c611c6]::ops::function::Fn<(&dyn for<'a, 'b> core[fca7800875c611c6]::ops::function::Fn
<(&'a core[fca7800875c611c6]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[fca7800875c611c6]::marker::Sync + core[fca7800875c611c6]::marker::Send, &core[fca7800875c611c6]::panic::panic_info::PanicInfo)>>::call
     7:        0x1010f0524 - std::panicking::rust_panic_with_hook::h5db4d2345b297bed
     8:        0x1010eff2c - std::panicking::begin_panic_handler::{{closure}}::h3fd558f09a0d5492
     9:        0x1010edbd8 - std::sys_common::backtrace::__rust_end_short_backtrace::hfc76eebe1ce501b2
    10:        0x1010efc9c - _rust_begin_unwind
    11:        0x10114c140 - core::panicking::panic_fmt::hc2b459a5bd3dce66
    12:        0x10114c540 - core::result::unwrap_failed::h88d7eb352f20b747
    13:        0x10ad0633c - <std[e84bc52996b8b382]::sync::once::Once>::call_once_force::<<std[e84bc52996b8b382]::sync::once_lock::OnceLock<usize>>::initialize<<std[e84bc52996b8b382]::sync::once_lock::OnceLock<usize>>::get_or_init<rustc_i
nterface[617d4417f0fbb0b3]::util::init_stack_size::{closure#0}>::{closure#0}, !>::{closure#0}>::{closure#0}
    14:        0x10114ad9c - std::sys::sync::once::queue::Once::call::h4d48f66a899a23f1
    15:        0x10e6698f8 - <std[e84bc52996b8b382]::sync::once_lock::OnceLock<usize>>::initialize::<<std[e84bc52996b8b382]::sync::once_lock::OnceLock<usize>>::get_or_init<rustc_interface[617d4417f0fbb0b3]::util::init_stack_size::{closure
#0}>::{closure#0}, !>
    16:        0x10a5c4988 - rustc_interface[617d4417f0fbb0b3]::util::run_in_thread_with_globals::<rustc_interface[617d4417f0fbb0b3]::interface::run_compiler<core[fca7800875c611c6]::result::Result<(), rustc_span[984a238feadb13f5]::ErrorGu
aranteed>, rustc_driver_impl[17630cf877ef70bb]::run_compiler::{closure#0}>::{closure#1}, core[fca7800875c611c6]::result::Result<(), rustc_span[984a238feadb13f5]::ErrorGuaranteed>>
    17:        0x10a580160 - rustc_interface[617d4417f0fbb0b3]::interface::run_compiler::<core[fca7800875c611c6]::result::Result<(), rustc_span[984a238feadb13f5]::ErrorGuaranteed>, rustc_driver_impl[17630cf877ef70bb]::run_compiler::{closu
re#0}>
    18:        0x10a56baa0 - <rustc_driver_impl[17630cf877ef70bb]::RunCompiler>::run
    19:        0x10a5c5600 - std[e84bc52996b8b382]::panicking::try::<core[fca7800875c611c6]::result::Result<(), rustc_span[984a238feadb13f5]::ErrorGuaranteed>, core[fca7800875c611c6]::panic::unwind_safe::AssertUnwindSafe<rustc_driver_impl
[17630cf877ef70bb]::main::{closure#1}>>
    20:        0x10a573a74 - rustc_driver_impl[17630cf877ef70bb]::main
    21:        0x100284580 - rustc_main[393026df47323ce6]::main
    22:        0x100284534 - std[e84bc52996b8b382]::sys_common::backtrace::__rust_begin_short_backtrace::<fn(), ()>
    23:        0x10028454c - std[e84bc52996b8b382]::rt::lang_start::<()>::{closure#0}
    24:        0x1010d5e40 - std::rt::lang_start_internal::hecc68fef83c8f44d
    25:        0x1002845b4 - _main

```

</p>
</details>