Book excerpt: Advanced Windows Debugging

Book excerpt: Advanced Windows Debugging

Mario Hewardt and Daniel Pravat

Debugging, the process of locating and fixing errors, is an important of the software development lifecycle, but it, and guidance about it, is often overlooked.

Not so with Advanced Windows Debugging, which describes debugging everything from memory corruptions to thread synchronization and demonstrates how to fix the security threats and resource leaks that are side effects of failing to debug.

Chapter 6, Memory Corruption, Part II -- Heaps, focuses on how hackers may capitalize on the Windows Heap Manager to target an application. (A heap is used for the free allocation of memory and is common when the size of the memory is unknown but expected to exceed that which can fit into automatic memory.)

The chapter begins with a quick look at the architecture of the heap manager and a sample application that uses the heap manager to both allocate and free memory. From there the authors examine some of the most common types of heap corruptions -- overruns, underruns, heap handle mismatches and so on -- and provide detailed debug sessions that identify the sources of such corruptions.

Read the excerpt in this PDF file.

 


Excerpted

    Requires Free Membership to View

    When you register, you'll begin receiving targeted emails from my team of award-winning writers. Our goal is to provide a unique online resource for developers, architects and development managers tasked with building and maintaining enterprise applications using Visual Basic, C# and the Microsoft .NET platform.

    Hannah Smalltree, Editorial Director

    By submitting your registration information to SearchWinDevelopment.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchWinDevelopment.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

from Advanced Windows Debugging (ISBN: 978-0-321-37446-2) by Mario Hewardt and Daniel Pravat.
Copyright © 2007. Published by Addison-Wesley Professional as part of the Microsoft Technology Series, and available at your favorite book seller. Reprinted with permission.

This was first published in February 2008

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.