3 ms·
Oh, the joys of Win32 programming. Back in the day I wrote networking service that was occasionally failing under stress load with memory corruption. I was sta
by vl 14y ago
Oh, the joys of Win32 programming.
Back in the day I wrote networking service that was occasionally failing under stress load with memory corruption. I was staring at rare dumps, re-reading code and documentation to no avail. Finally, after few days of debugging, I went ahead and located debug symbols and sources (oh, I happened to work at Microsoft at the time) for the build of Windows we used at the test lab, it was relatively arcane procedure back then (it got better later, but at the time it was either symbol server doesn't work, or sources don't match).
So I setup gflags with memory guards and windbg and started waiting. After few days of stress run it finally crashed again and there it was - comment in the code of the crashing library saying "OVERLAPPED can be deallocated at this time if completion ports are used, but we save this value to it here anyways for backward compatibility reasons with bla-bla." Glad that you told me guys, I guess now I have to rewrite it and refcount the OVERLAPPED! I still don't know how I could debug it without the source access. (Ironically, it also enlightened me on why service I implemented at the startup before was occasionally crashing as well).
And don't even start me on implementing SSL support in the service.