Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Qnx IDE: Tip of the Day #21: Find Memory Corruption Problems: (3 Items)
   
Qnx IDE: Tip of the Day #21: Find Memory Corruption Problems  
IDE 4.6 provides two tools to help find runtime errors:
- Memory Analysis Runtime Error Detection
- Mudflap Integration

Memory Analysis Runtime Error Detection is part of Memory Analysis tool suite.
To run your program with runtime error detection you don't have to recompile it (but it has
to be debug version to see source code associations). To do this add Memory Analysis tool
in the Tools tab of Launch Configuration and select Switch to this tool's perspective checkbox.
When program run you will see new session created in Session view of Memory Analysis perspective.
Double click on session to open it and switch to Errors tab. To try it out you can create Example project (New->Example.
..->QNX Example Project - Detecting Runtime Errors) it has a code of application with bugs in it.

Mudflap Integration of IDE allows you to view errors detected by mudflap in convenient way with groping, sorting and 
source navigation. Mudflap is gcc instrumentation and runtime library (since QNX SDP 6.4.1) that instrument your code to
 watch for buffer overflows and other typical memory corruption errors.
To use it you need to compile your code with -fmudflapth option. To use IDE integration add Mudlfap tool in the Tools 
tab of Launch Configuration.

The difference between two tools:
- Memory Analysis has more false negative, but very little false positive (i.e. it misses real errors, but do not report
 incorrect ones). Mudlfap does the opposite - it has more false positives (i.e. report errors which are not correct)
- Memory Analysis does not require recompilation and has low performance impact
Post Deleted
Post Deleted