5 ms·
Today I learned: "PuTTY is a Win32 Telnet and SSH client. The SSH protocol code contains real-life use of this coroutine trick. As far as I know, this is the wo
by iokevins 11y ago
Today I learned: "PuTTY is a Win32 Telnet and SSH client. The SSH protocol code contains real-life use of this coroutine trick. As far as I know, this is the worst piece of C hackery ever seen in serious production code."
- O5vYtytb 11y agoWow,no kidding https://github.com/Yasushi/putty/blob/31a2ad775f393aad1c31a983b0baea205d48e219/ssh.c#L414 https://github.com/Yasushi/putty/blob/31a2ad775f393aad1c31a9... It's beautiful and incredibly scary at the same time.
- majke 11y agojust wow, from the snippet you linked: * - right-click ssh.c in the FileView * - click Settings * - select the C/C++ tab and the General category * - under `Debug info:', select anything _other_ than `Program * Database for Edit and Continue'. Right, so in order to compile the thing you need to click "something other than". That doesn't sound deterministic.
- becauseICan 11y agoThat's ensuring the compiler obeys some behaviors of an ANSI C compiler when debugging in MS Visual Studio. That strikes me as the kind of practice that would improve determinism. The explanation is given on the line before your quote. That said, I can't believe this exists in the wild.