<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Memory-Safety on Kuldeep Pisda</title><link>https://kdpisda.in/tag/memory-safety/</link><description>Recent content in Memory-Safety on Kuldeep Pisda</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 14 Oct 2026 08:30:00 +0530</lastBuildDate><atom:link href="https://kdpisda.in/tag/memory-safety/index.xml" rel="self" type="application/rss+xml"/><item><title>Rust's T: 'static Bound Is Not Checked on Inferred Locals, and Drop Is Only the Messenger</title><link>https://kdpisda.in/rust-borrowck-static-bound-bypass-inferred-local-wf/</link><pubDate>Wed, 14 Oct 2026 08:30:00 +0530</pubDate><guid>https://kdpisda.in/rust-borrowck-static-bound-bypass-inferred-local-wf/</guid><description>&lt;p&gt;&lt;a href="https://github.com/rust-lang/rust/issues/164250"&gt;rust-lang/rust#164250&lt;/a&gt;, opened on October 13, 2026, shows safe Rust code that stores a reference to a dead stack variable in a struct whose type parameter is declared &lt;code&gt;T: 'static&lt;/code&gt;. The reporter says it reproduces on current nightly and on stable back to 1.85.0. The thread&amp;rsquo;s commenters report variants that have compiled for much longer: one since 1.18.0 in 2017, another since 1.4.&lt;/p&gt;
&lt;p&gt;The report is built around a &lt;code&gt;Drop&lt;/code&gt; impl, and most of the discussion follows it. I compiled the repro on rustc 1.97.0 and then took the &lt;code&gt;Drop&lt;/code&gt; impl out. The program still compiles. That narrows the bug to something more specific than &amp;ldquo;drop glue trusts a lifetime.&amp;rdquo;&lt;/p&gt;</description></item></channel></rss>