Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Getting an assertion failure when instrumenting takes a large amount of memory

LegacyForum
LegacyForum Posts: 1,664 ✭✭
edited December 2016 in Insure++
The application I am instrumenting allocates large amounts of memory, so much that it exceeds the default 256M heap limit imposed by AIX 5's libc, so I have to compile the application with -Wl,-bmaxdata:0x80000000. When running under insure, the program runs for a while and allocates approx 168M before it crashes with the following:

### Memory/HeapImp.cc:1822: assertion failed
### @(#)$;RCSfile: HeapImp.cc,v $ $Revision: 32.13 $ $Date: 2004/06/18 00:48:50 $

Program received signal SIGTRAP, Trace/breakpoint trap.

I suspect that it may have something to do with the extensive use of the heap the application is doing. Is there something I should be doing differently? Here are the version stamps:

Insure++ Version 7.0.4 (build 2005-06-23)
g++ (GCC) 3.3.3
AIX 5.2

Comments

  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    This assertion is there just for that reason to put out something a little more informative than just to crash if we have to allocate more memory than is currently available. This is just insure saying there isn't enough memory to make the allocation it needs to.
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Is there a way to increase the size of the heap that insure can allocate from? Maybe a -z option? There's not a problem with system memory, as real/virtual memory is more than sufficient, and the normal execution of the application certainly exceeds 256MB.
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Insure itself doesn't have control over that. And it places no limits on how much may be allocated it will try to allocate whatever it needs and if it's unavailable you'll just hit that assertion.

    You might check

    vmstat

    ulimit -a

    and see and stack and data sizes are set to and bump them up. On AIX there is also an environment variable LDR_CNTRL that you may need to set. Take a look at

    http://groups.google.com/group/comp.unix.a...239bd3f49329812


    Hopefully the url comes out in this post if not just do a search for LDR_CNTRL on http://groups.google.com and you should be able to find it.