0
Zulukas
7y

I've been working on an extremely intermittent bug for the past week in my project that occurs during a stress testing between a PC based server and an embedded device that share files. When the crash happens, I analyze what happened by looking at a file as a result of an fwrite, look at a diff of it, look at the packets etc. For the past 3 days I had been lead to believe there was a bug in stdio.h's fwrite due to a file being written looking like it was truncated in the diff, but the packets telling a different story (X bytes sent to be written, on the result I report X bytes written). Today I noticed that there was either a bug or an issue in the diffing algorithm that led me to think my code was the issue. I spent 3 fucking days trying to figure why fwrite was truncating and lieing about its result when my diff tool was the culprit. FML.

Comments
Add Comment