logoalt Hacker News

CamperBob2today at 1:32 AM4 repliesview on HN

When's the last time you saw a decent coding model create a buffer-overflow bug while trying to use C strings?

Serious question. Anyone else seen this happen in the last 12-18 months? If so, which model and version were you using?


Replies

smj-edisontoday at 5:46 AM

I use Zig, which has slices, so so far none. But man, it can't get ref counting right to save its life. There have been remarkably few times it's gotten it right on the first try. My codebase considers OOM recoverable, so it keeps forgetting to clean up memory when OOM is raised. Even in the happy path though it still messes up ref counting. I use Kimi k2.6.

smackeyackytoday at 2:46 AM

I had Claude write a bit of stupid C# the other day that had an off by one string truncate. Surprised the hell out of me.

macintuxtoday at 1:39 AM

Would you even know? Serious question. The volume of code the models can produce, the subtle ways these bugs can manifest (or even only manifest when under attack), it seems like they would be easy to overlook.

show 1 reply
krupantoday at 3:24 AM

How many people are writing C code with LLMs? I get the impression it's mostly JavaScript web apps

show 1 reply