4 ms·
I used Claude Code to review a kernel driver patch last week. It found an issue that was staring me in the face, indeed one I would’ve expected the compiler to
by lukeh 1y ago
I used Claude Code to review a kernel driver patch last week. It found an issue that was staring me in the face, indeed one I would’ve expected the compiler to flag.
- vhantz 1y ago[flagged]
- lukeh 1y agoSure. It was an uninitialized variable in the retry loop below. Fixed now. https://github.com/PADL/linux/commit/b83b9619eecc02c5e95a1d33fc0913407a4cd46d https://github.com/PADL/linux/commit/b83b9619eecc02c5e95a1d3...
- vhantz 1y agoThere's no such thing being fixed in those diffs
- quietbritishjim 1y agoI think it contains the bug (min_attempts), not the fix.
- lukeh 1y agoThis is the fix. The bug commit was squashed. I don’t really know what I need to prove here, except that Claude Code helped identify an issue and fix it.
- vhantz 1y agoCompilers have been warning about unitialized variables for a very long time now. The claim was that the compiler missed that in a patch you reviewed for the kernel. The link posted does not show the review discussion nor a commit log showing that incremental fix, and so does not at all support the claim.
- lukeh 1y agoContext: I’m working on a series of patches to support MDIO-less configuration of mv88e6xxx switches. They have not been submitted to netdev yet as they’re dependent on other unsubmitted patches from another kernel developer. The code above is a WIP so fixes have been squashed. You’ll have to take my word that I found Claude Code helpful in reviewing the code, I’m not going to dig around for the previous commit hash to satisfy some HN comment. To the point of compilers warning about uninitialized variables, this surprised me; perhaps I was building without optimization.
- therealpygon 1y agoYou don’t have to prove anything. If the LLM helps you, that is what matters to you. If it doesn’t help them, that is what matters to them. The problem is always the people trying to be “right”. If a person, project or company doesn’t want to allow/use LLMs for their controlled code, go ham, doesn’t bother me any. Why the reverse of that isn’t also true is baffling, but often par for the course here.
- amelius 1y agoLook like valgrind would be able to catch that too.
- usr1106 1y agoWhat about: Could you please give us links to patches before and after or any other details (has already happened, just commenting on the comment style)
- dang 1y agoCan you please not post like this to HN? You're welcome to ask substantive questions, thoughtfully, of course, but cross-examination (and aggressive commenting generally) is against the site guidelines: https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html.
- KyleBerezin 1y agoYea, there will always be the pro vs anti 'thing' argument; and like always the correct answer is responsible use of 'thing'. I consider debugging to be an almost universally responsible use of LLMs.
- pydry 1y agoI wonder how long it'll take to percolate up to the C level that it's useful for code reviews and search and a liability for actual coding.