Changes between Version 3 and Version 4 of Tools/Memory Checker


Ignore:
Timestamp:
Jan 30, 2009, 4:36:19 PM (15 years ago)
Author:
Nicolas Pouillon
Comment:

Misc

Legend:

Unmodified
Added
Removed
Modified
  • Tools/Memory Checker

    v3 v4  
    55== Overview ==
    66
    7 The Memory checker is able to perform several analysis on memory accesses performed by the running software to track software bugs. Access to uninitialized or freed data and stack overflow are examples of reported behaviors. It acts as the [http://valgrind.org/ valgrind] memory checker tool found on some unix.
     7The Memory checker is able to perform several analysis on memory accesses performed by the running software to track software bugs. Access to uninitialized or freed data and stack overflow are examples of reported behaviors. It acts as the [http://valgrind.org/ valgrind] memory checker tool found on some UNIX.
    88
    99== Implementation ==
    1010
    11 Like the GdbServer, the Memory checker contains no processor specific code and can be used to manage any Soclib processor model using the generic Iss interface. It is implemented as an Iss wrapper class. When the Memory checker is in use, it intercepts all events between the processor Iss model and the Soclib platform. The running operating system must be instrumented slightly to let the Memory checker be aware of valid stack ranges and allocation ranges. The [http://www.mutek.fr MutekH] operating system is working with the Memory checker.
     11Like the [Tools/GdbServer Gdb Server], the Memory checker contains no processor-specific code and can be used to manage any Soclib processor model using the generic [Component/Iss2Api Iss2 interface]. It is implemented as an Iss wrapper class.
     12
     13When the Memory checker is in use, it traces all events between the processor Iss model and the SoCLib platform. The running operating system must be instrumented slightly to let the Memory checker be aware of valid stack ranges and allocation ranges. The [http://www.mutek.fr/ MutekH] operating system is working with the Memory checker.
    1214
    1315=== What is being checked ===
     
    2224 * The stack memory is marked as non-initialized when a new execution context is created.
    2325 * The stack memory is always considered as non-initialized below the stack pointer.
    24  * Memory r/w accesses can not occur below the stack pointer.
     26 * Memory r/w accesses in stack can not occur below the stack pointer.
    2527
    2628Memory allocation and region checks:
    27  * Write accesses can not occur in read only preloaded sections.
     29 * Write accesses can not occur in read-only preloaded sections.
    2830 * Preloaded sections are marked as uninitialized when appropriate.
    2931 * Memory is marked as uninitialized on `malloc()` invocation.
     
    3638Suspicious memory accesses produce a message on simulator `stdout` stream. This simulation is not stopped though.
    3739
    38 An exception can be reported to an optional GdbServer module to stop processors execution when a suspicious memory access happened. This enables further analysis of buggy software. When using the Memory checker with the GdbServer, the Memory checker must wrap the processor directly and must be wrapped in the GdbServer.
     40An exception can be reported to an optional `GdbServer` module to stop processor execution when a suspicious memory access happened. This enables further analysis of buggy software. When using the Memory checker with the `GdbServer`, the Memory checker must wrap the processor directly and must be wrapped in the GdbServer.
    3941
    4042== Usage ==
     
    5658   // With Memory checker
    5759   soclib::common::Memchecker<soclib::common::Mips32ElIss>::init(maptab, loader);
    58    soclib::caba::VciXcacheWrapper<soclib::common::Memchecker<soclib::common::Mips32ElIss> > cpu0("cpu0", 0, maptab, IntTab(0), 1,8,4, 1,8,4);
     60   soclib::caba::VciXcacheWrapper<soclib::common::IssMemchecker<soclib::common::Mips32ElIss> > cpu0("cpu0", 0, maptab, IntTab(0), 1,8,4, 1,8,4);
    5961}}}
    6062
     
    6264
    6365{{{
    64 Uses('iss_wrapper', iss_t = 'common:memchecker_iss', memchecker_iss_t = 'common:mips32el'),
     66Uses('vci_xcache_wrapper', iss_t = 'common:iss_memchecker', iss_memchecker_t = 'common:mips32el'),
    6567}}}
    6668
    6769=== Using an instrumented operating system ===
    6870
    69 The running operating system must communicate with the Memory checker to report information about context creation, stack range and allocator operations. This is done through read/write accesses to specific memory locations which are intercepted by the Memory checker and not forwarded to the rest of the platform.
     71The running operating system must communicate with the Memory checker to report information about context creation (stack range), and memory-allocator operations. This is done through read/write operations in specific memory locations which are intercepted by the Memory checker and not forwarded to the rest of the platform.
    7072
    71 Currently the only known supported operating system is [http://www.mutek.fr MutekH] with Mips processor. Other processors are partially supported, only memory allocation checks are performed. To use the memory checker with MutekH, simply add the `CONFIG_SOCLIB_MEMCHECK` configuration token to your configuration file.
     73Currently the only known supported operating system is [http://www.mutek.fr MutekH] with Mips32 processor. Other processors are partially supported, only memory allocation checks are performed. To use the memory checker with MutekH, simply add the `CONFIG_SOCLIB_MEMCHECK` configuration token to your configuration file.
    7274
    7375Note: