Cannot poll CpuFuture twice: Canceled

Hi, I have an old project use future 0.1, when upgrade rust from nightly-2023-02-02 to latest version, I got this poll twice error, I create a minimal demo to reproduce it here:

The tricky point is that this bug only happens in release build, not in debug build.

And when running it in gdb, I could see a double free error, but I have no idea how to debug further, appreciate it if guys here could help me.

Miri UB warning about compat feature · Issue #2514 · rust-lang/futures-rs · GitHub seems like it may be relevant.

Thanks for the link, it seems the future 0.1 is not sound for latest rustc.