- The Rust compiler must block code that points to data after that data is gone. GitHub rust-lang/rust issue 164250 reports that placing a short-lived reference in a struct field can bypass this check.
- In the original example, the program compiled and printed a memory value that had already been freed. The issue author wrote that when AddressSanitizer, a memory address checking tool, was enabled, the program stopped with a stack-use-after-scope error. This is the result the author reported.
- The author wrote that it reproduces on nightly (pre-release test builds) and on stable versions 1.85.0 and later. The claim that the same code compiled after 1.18.0 is an experience reported by a commenter.
- The issue body classifies this problem as P-high (high priority) and explains that exploiting it requires a deliberately built Drop implementation. This is the judgment of the issue authors. The original text does not confirm any fix code or a released version that contains a fix.
O: For Rust library developers who handle references inside their own Drop implementations, this issue's example code is useful to run first when checking whether short-lived references are involved in their code.
X: The source does not confirm that a fix has been released, and the judgment that a deliberate Drop implementation is needed for exploitation comes from the issue authors' claims, so the actual scope of impact should be checked separately.