logoalt Hacker News

ZiiSyesterday at 7:46 AM4 repliesview on HN

What would be interesting is if they found a memory unsafe bug. Postgres is a perfect case study of 30 years of C with a bit of CPP; if rewriting in a safer language didn't find anything...


Replies

derdiyesterday at 9:10 AM

I would expect Postgres to be heavily tested with things like Valgrind and various sanitizers. I'd be surprised if there were low-hanging fruit. But also, if there is code that does something fishy with pointers, wouldn't the AI likely paper over it by adding an unsafe block in the Rust version, preserving the same fishiness? It's hard to know how hard it would try to prove that the original is broken.

groundzeros2015today at 11:02 AM

C programmer have learned how to deal with memory problems and have whole suites of tools for finding them.

Is it cheaper to find them at compile time rather than runtime? Yes.

But it’s not an unsolved problem. Memory bugs are a known unknown.

show 1 reply
pknerdyesterday at 1:27 PM

> What would be interesting is if they found a memory unsafe bug

They will ask relevant Claude skill.md

whatever1yesterday at 8:00 AM

You are exactly right. There is no freaking way there was no unsafe behavior in a code case of the size of Postgres.

In fact from a porting effort this is the first blog post I would expect. Not that the hey we successfully did it.