Microsoft KB Archive/246304

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 13:49, 21 July 2020 by X010 (talk | contribs) (Text replacement - """ to """)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Base

Debugging Ported Code

Article ID: 246304

Article Last Modified on 11/1/2006


  • Microsoft Interix 2.2 Standard Edition
  • Microsoft Interix 2.2 Standard Edition
  • Microsoft Interix 2.2 Standard Edition
  • Microsoft Interix 2.2 Standard Edition

This article was previously published under Q246304


When debugging ported code, there are several behavioral differences between Interix and traditional systems like Solaris.

Some users porting code notice that their application memory faults more often than it did on the original platform. This is usually a result of defects in the code, and not in the Interix subsystem.

A common cause of this behavior is trying to dereference an uninitialized pointer. An uninitialized pointer contains some random bit pattern. An attempt to read or write to that location will succeed or fail depending on whether the user is permitted access to that address. If the attempt fails, it fails with a segment fault. If it succeeds, it may cause problems for other programs using that memory space.

In Microsoft Windows NT 4.0, most of the four-gigabyte address space is off limits to the user program. Any attempt to read or write to this space causes the segmentation violation.


The third-party products that are discussed in this article are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.

For a more complete description of this issue, see the "Porting Applications in C" Tech Note topic at the following Interix Web site:

Keywords: kbinfo kbenv KB246304