Code Room
Vibe codingHardvc-g160
Subject Ai fuzz testingLevel Senior–Staff~22 minCommon in Code quality & review interviewsIndustries Telecom, Software development

Question

You're shipping a hand-rolled, fast C++ varint decoder for a networking protocol and asked an AI to help you test it adversarially. It proposed a fuzz target that feeds random bytes and asserts the decoder doesn't crash or read out of bounds (with ASan). That's useful but you want to be sure decoded values are correct, not just that it doesn't crash. Describe the testing approach you'd direct the AI to build, and the trap in verifying a decoder this way.

What a strong answer looks like

Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it — tests, edge cases, reading critically — and how you’d re-prompt or decompose to get it right.

Describe your solution

Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.

Run or narrate your approach, then ask the coach.