[openib-general] opensm segfault?

Jason Gunthorpe jgunthorpe at obsidianresearch.com
Tue May 16 23:32:12 PDT 2006


On Wed, May 17, 2006 at 09:10:11AM +0300, Eitan Zahavi wrote:
> cl_memcpy  should have some debug capabilities on top of memcpy ...
> cl memory management provide means to track all memory allocations, etc.

There are a huge number of canned solutions that provide a way to debug
memory problems without polluting the code with wrapper functions...
You can even fairly easially take your particular tracking functions
and build them into a canned linkable solution.

Wrapping ISO C (and IMHO, SUSv3) functions is almost always a bad
idea. It creates a maintenance pain because people will inevitably
add new code that doesn't use the wrappers.

Debugging hooks can always be integrated in with linker tricks and
portability is _always_ better served by just providing missing ISO
and SUSv3 functions on deficient platforms (using autoconf, libraries
and #include_next this can be made totally seamless)

Jason



More information about the general mailing list