Writing Solid Code: Microsoft's Techniques for Developing Bug-free C ProgramsThis book takes on the problem of software errors by examining the kinds of mistakes developers typically make. The key to writing bug-free code is to become more aware of how and why bugs come about. Programmers can gain this awareness by asking two simple questions for every bug they encounter: "How could I have prevented this bug?" and "How could I have automatically detected this bug?" The guidelines presented in this book are the results of programmers regularly asking these questions over a number of years. |
Contents
A HYPOTHETICAL COMPILER | 1 |
FORTIFY YOUR SUBSYSTEMS | 45 |
STEP THROUGH YOUR CODE | 75 |
Copyright | |
6 other sections not shown
Common terms and phrases
algorithm allocated memory ANSI arguments assembly language assertions behavior bitwise operators buffer byte ppb catch bugs Chapter char pch character Charles Simonyi CMOVE compiler dangling pointers data structures debug code debug version define endif error condition example fix bugs fNewMemory FreeMemory fResizeMemory function garbage getchar grammers handle ifdef DEBUG implementation inputs instruction interface look loop Macintosh macro malloc master sources memchr memcpy memory block memory manager memory-mapped I/O memset Microsoft MS-DOS NoteMemoryRef NULL pointer operators optimizations outputs pbFrom pbNew pchEnd pchPlant portable preprocessor problem programmers pvTo pwnd realloc risky routine ship version statement step Steve Maguire strcmp strcpy strFromUns string strRight subsystem testers testing group tion uCur undefined behavior unit tests unsigned char validate verify window write code writing bug-free code Writing Solid Code



