One of my Favorite Bugs

On twitter, @SeanNoxious asked me about my most memorable bug. The answer is way too long for twitter, so I thought I’d document one of my favorites here.

When I first joined Microsoft way back in 1995, I was a tester for networking components on Windows 95. One of the areas I owned was testing networking on Japanese, Chinese, and Korean versions of Windows.The early versions of windows and all of the 9x versions of windows didn’t have Unicode. Character sets were multi-byte on those systems, meaning that characters may be made up of one or two bytes. Alpha-numeric characters were usually single-byte (wide / two byte versions also existed (when a character had both a single-byte and double-byte version, the single-byte version was referred to as the half-width character. There’s a lot more to say about double-byte characters, but I’ll skip ahead to the good part.

The way windows could tell the difference between a double-byte character and a single-byte character was the lead byte. A certain range of characters are designated lead bytes. They always indicate that the lead byte, and the next character in the stream are combined to make a double-byte character. The Japanese character for ten (juu) has a hex value of 0x8F5C. The 8F indicates that the following characters are part of a double-byte character. The interesting thing about this particular character (and all characters with an 5C trail byte) is that 5C is the hex value for a backslash – a character very interesting for network testing on Windows.

There were other characters with interesting trail bytes, but 5C characters were predominant in my testing, and I found a lot of bugs. One day, I was testing copying long files with 5C trail bytes to a Japanese version of Windows NT 3.51 (newly released!), and my test hung. I figured someone else was using the server and rebooted it or was debugging it for some reason, so I walked down to the lab to check it out; and it was sitting at a blue screen. I stared for a minute before doing what every tester does. I rebooted it, and ran back to my office to see if I could do it again.

Sure enough, I had found a serious bug in the NT networking components. One that I knew was tested by people way more experienced than I was, and I was pretty excited.We found other bugs in NT, and plenty of multi-byte bugs in networking, but crashing a remote server has to be one of my favorite finds.

I have another cool backslash story, but I’ll save it for another post.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.