frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

11 year old unsoundness bugs found in Rust borrow checker

https://github.com/rust-lang/rust/issues/164250
123•formerly_proven•1h ago

Comments

vincent-uden•47m ago
What the hell. This is not the esoteric, crazy, impractical constellation I expected to find with a title like this. The minimal example is so simple and is definitely something you'd easily come across in normal code.
LoganDark•42m ago
I wonder if the reason it works is because you'd easily come across it in normal code, and someone didn't realize that saving the effort of implementing a check for this would result in unsoundness.
jvanderbot•39m ago
Not really. I've worked with rust for 4 years, systems side, and never had to write a custom drop implementation. That's the gotcha here, not the rigamarole with the static+Send option type (which _would_ be something you'd encounter in prod).
bryanlarsen•29m ago
I've written dozens of custom Drop implementations. Well, many of them are named cleanup because of the async Drop mess in Rust, but...
neysofu•16m ago
That's easily the exception rather than the rule. I've seen custom `Drop` implementations in almost every non-trivial Rust codebase I worked on.
gspr•6m ago
A custom `Drop` appears very quickly with FFI code. Suppose for example you interface with some C library that expects you to call a function to release some resources.
insanitybit•38m ago
For a long time `loop {}` was undefined behavior. Lots of l-unsounds are really nuts but a few are not.

The reality is that if this were actually code that people wrote, well, it wouldn't have sat around for a decade.

cowlevel•43m ago
Rust is not a memory-safe language. cve-rs proved it years ago but Rust proponents argued that cve-rs is too contrived to matter, or that it's a compiler bug so it doesn't count.
insanitybit•38m ago
lol do you think that cve-rs was required? there is literally an l-unsound tag on rustc's github, this isn't some embarrassing or secret thing.

Safe rust is safe, granting `unsafe` and compiler errors. This isn't a secret.

psychoslave•33m ago
What's l- here? Literal?
pas•15m ago
"I" stands for "issue"

https://github.com/rust-lang/rust/labels?q=unsound

high_na_euv•38m ago
in compare to c and cpp? it is
cowlevel•34m ago
And in absolute terms?
qweqwe14•
Hugsbox•43m ago
I don't understand how something like this could take so long to be discovered. Pretty crazy stuff.
lelanthran•25m ago
> I don't understand how something like this could take so long to be discovered.

Maybe they wrote it in C :-)

On a serious note, old software is generally more trustworthy than new software, because bugs are discovered over time and with usage.

FuzzywarmWalnut•42m ago
Worked on a variance-related lint once and the scary part is how rarely anyone writes down variance by hand, so bugs there just sit untested for a decade.
MrBuddyCasino•41m ago
The heart of the matter:

  struct Q<T: 'static>(Option<T>);

  impl<T: 'static> Drop for Q<T> {
    fn drop(&mut self) {
        // Code in here has access to a non-'static &String
        // but assumes that it's a &'static String
    }
  }

  fn main() {
    let l = String::new();
    let mut q = Q(None);
    q.0 = Some(&l);
  }
I wonder if the certified compiler for safety critical uses has the same issue.
high_na_euv•37m ago
which compiler?
sshine•35m ago
Ferrocene
wg0•25m ago
DeepSeek v4.1 Flash thinks it should NOT compile. Whereas in reality it DOES compile which is why it is filed as a bug.
jug•14m ago
They're seriously using AI as a judge for what to file?
afdbcreid•10m ago
The issue and none of the comments mention AI. It is pretty clear your parent said it by themselves.
wg0
badatnames•39m ago
There is a collection of these someplace. Rust is better but it'll never be perfect, news at 10
zer00eyz•9m ago
Rust is good, I generally do not dislike it - but it does have flaws.

I will happily continue to write things in Golang first. I don't enjoy refactors in Rust, and it's rare that I see things that genuinely need its raw performance.

Cloudflare's Oxy is a stellar example of build in Golang till your design is settled and then port over for performance when you need it.

akoboldfrying•33m ago
As an old C++ guy, my take is: Heh heh heh.

ETA: Downvoters, I salute you. Without your selfless courage, the forces of light humour would surely prevail.

rvz•21m ago
Yeah. A reminder that no language is a silver bullet even if it is heavily marketed. Especially with the “written in XYZ™” tag line.
mrlonglong•9m ago
You got my upvote.
mrkeen•31m ago
Type systems are hard! Check out https://counterexamples.org/

I gave it a quick scan for Rust examples; there are 11 samples among the following pages:

  https://counterexamples.org/eventually-nothing.html
  https://counterexamples.org/mutable-matching.html
  https://counterexamples.org/selfishness.html
  https://counterexamples.org/scope-escape.html
  https://counterexamples.org/nearly-universal.html
The first thing I always look for is mutability (combined with some other tricky feature), e.g. "Now it's a Just(3):Maybe<Int>, now it's a Nothing:Maybe<Int>, now it's a Nothing:Maybe<String>."

I wonder if TFA's example could be reproduced without mutability.

rvz•29m ago
This should not be a surprise at all given the amount of soundness bugs that were collected in the Rust compiler but no-one cared. [0]

[0] https://arxiv.org/abs/2608.28713

optionalsquid•14m ago
It looks like 18 of the 30 issues listed in table 4 had already been fixed when that paper was released, and there is activity in most of the rest. One was recently flagged as being fixed by -Znext-solver, and another has the submitter write that it is fixed, but the issue is not closed. And that's before you consider the impact of the individual issues; how many of the remaining issues impact "real" code?

So I don't think it's fair to claim that "no-one cared".

purplesyringa•13m ago
I don't think "no one cared" is a fair characterisation. The paper doesn't support this conclusion, and from experience I'd say that the two difficulties in fixing unsoundness are doing so without breaking existing code (Rust guarantees stability unless the code is unsound, and introducing previously missing checks can cause sound code to stop compiling, which is a problem if it occurs often) and doing so in a reliable way that can be supported long-term. Rust is currently in the progress of stabilizing next-solver and Polonius, both of which fix multiple long-standing bugs and have been worked on for years now due to intrinsic complexity, performance considerations, compatibility issues, etc. It's not that no one cares, it's just that this stuff is hard and takes time.
JABVOLT•8m ago
very very good job
23m ago
Literally nothing can be anything in absolute terms, what's your point? The fact is that Rust is miles better than any other language in terms of memory safety & performance ratio. That's all that matters.
david-gpu•29m ago
Let us not conflate a bug in an implementation (rustc) with a defect in the language (Rust).
cowlevel•23m ago
Which clause of the language specification is being violated?
mrkeen•22m ago
AFAIK there isn't a language spec. Rustc is the language for now.
afdbcreid•7m ago
But bugfixes are also allowed. So the fair conclusion is that the implementation is broken, but the language is not - because it's possible to fix, and it's possible for all known soundness issues (including the cve-rs one). For this one specifically, I've heard people are already working on a fix.
•
10m ago
I was just checking what outcome an LLM would have based on the patterns in its probabilistic distribution it has seen the wild.

Most LLMs would probably say this piece of code won't compile.

afdbcreid•9m ago
> I wonder if the certified compiler for safety critical uses has the same issue.

It uses the same code, so yes.

(Although I don't know what are their guidelines, it might be that they require avoiding code relying on implied bounds, for example).

11 year old unsoundness bugs found in Rust borrow checker

https://github.com/rust-lang/rust/issues/164250
130•formerly_proven•1h ago•42 comments

An hour of audio transcribed in about 13s on MacBook Air

https://eg2.haku.sh/
21•amrrs•21m ago•4 comments

Show HN: Use your OpenAI subscription to create audiobooks

https://pdftomp3.com/connect-ai/
29•janpmz•1h ago•22 comments

Hittite royal archive found in Turkey

https://www.thehistoryblog.com/archives/77107
98•benbreen•5h ago•11 comments

CFTC Staff Were Told to Retract Analysis of Suspicious Oil Trades

https://www.bloomberg.com/news/features/2026-10-13/cftc-staff-told-to-retract-analysis-of-suspici...
72•helsinkiandrew•1h ago•11 comments

The baffling intelligence of a single cell (2024)

https://jsomers.net/e-coli-chemotaxis/
313•jsomers•2d ago•85 comments

GLM-Legal

https://z.ai/blog/glm-legal
588•ilreb•19h ago•332 comments

Intel D270 GPU AI Accelerator–Up to 480 GB LPDDR5X

https://www.intel.com/content/www/us/en/products/details/discrete-gpus/data-center-gpu/d-series.html
247•hurricanepootis•14h ago•119 comments

Hackers activate automatic defrosting in supermarket fridges across Europe

https://www.tomshardware.com/tech-industry/cyber-security/unprecedented-cyberattack-cripples-supe...
739•Zeekaas•23h ago•855 comments

A Modern Web App in C

https://prophitt.me/writing/a-modern-web-app-in-c
599•prophittcorey•19h ago•252 comments

Document Review with Unsiloed and TypeSafe Jev

https://www.unsiloed.ai/blog/document-review-unsiloed-typesafe-jev
15•ritzaco•3h ago•3 comments

Who is vfmaddrnd231pd?

https://purplesyringa.moe/blog/who-is-vfmaddrnd231pd/
220•pngmangi•14h ago•21 comments

Janas: Run LLMs larger than RAM by streaming experts from SSD

https://github.com/prabanta-dev/janas
163•khalidkhair•13h ago•56 comments

Making big downloads resumable in Firefox

https://lunarwatcher.codeberg.page/til/firefox/resumable-big-downloads.html
224•speckx•16h ago•106 comments

Crypto thieves sell hardware wallets with secret eSIM

https://www.heise.de/en/news/Crypto-thieves-sell-hardware-wallets-with-secret-eSIM-11485188.html
54•qwertox•3h ago•35 comments

AWS Lambda Web Functions

https://aws.amazon.com/blogs/aws/announcing-aws-lambda-web-functions-for-fast-consistent-web-app-...
34•HatchedLake721•1h ago•15 comments

Turn a WiFi 7 Router into a 320Msps Software Defined Radio Receiver

https://github.com/h0m3us3r/w1700k-sdr
361•djfergus•23h ago•100 comments

Citroen revives the 2CV for an electric age

https://www.bbc.com/news/articles/c620r33plgppo
356•scrlk•23h ago•403 comments

Launch HN: Agent37 (YC F26) – Low-cost agent sandboxes for running agents

140•vishnukool•19h ago•98 comments

AI is a tool and using it well takes skill

https://yyhh.org/blog/2026/10/ai-is-a-tool/
443•layer8•14h ago•356 comments

Writing a Demoscene Intro for the ZX Spectrum

https://www.markround.com/blog/2026/zx-spectrum-intro
143•zdw•16h ago•26 comments

A look at the math that OpenAI claims computes faster Fourier transforms

https://www.argmin.net/p/faster-fourier-transforms
162•mochomocha•9h ago•108 comments

Auto Research: Integer multiplication below n log n

https://app.getsupers.com/auto-research
66•swesnow•1d ago•31 comments

AI models may soon self-replicate without access to data centers

https://www.reuters.com/business/ai-models-may-soon-self-replicate-without-access-data-centers-an...
18•samizdis•1h ago•22 comments

Solar panels that plug into your wall

https://www.nationalgeographic.com/environment/article/balcony-plug-in-solar-panels-renewable-energy
201•speckx•21h ago•212 comments

AI models can provably hide arbitrary capabilities

https://arxiv.org/abs/2610.13928
224•sbulaev•9h ago•112 comments

Show HN: SolidCraft – Open-Source Parametric CAD in Rust (With MCP Support)

https://github.com/bherbruck/solidcraft
72•bherbruck•11h ago•15 comments

Show HN: An experimental pattern-first DAW that supports MCP

https://github.com/andrewfader/blokkily
67•androsynth89•12h ago•29 comments

Character.ai Files for Bankruptcy

https://www.theverge.com/ai-artificial-intelligence/1009802/character-ai-files-for-bankruptcy-disney
8•yanis_t•24m ago•1 comments

The Making Of Super Mario 64 – full Giles Goddard interview (2001)

https://pixelatron.com/blog/the-making-of-super-mario-64-full-giles-goddard-interview-ngc/
257•gregsadetsky•2d ago•100 comments