Electric Fence has been ported to QNX and is available at:
http://sourceforge.net/projects/openqnx/
ElectricFence is a dynamic memory debugging library, which helps you find
dynamic memory under and over runs. ElectricFence was originally pointed out
to me and ported to QNX by Jim Prezorski. I did a minor clean up in the port
so it wouldn’t break any of the other OS builds.
The library is very simple to use - simply do following steps:
- Unpack the tgz file
- Do a make and make install
- Link libefence.a to your application (-lefence)
- Run you application and efence will cause a segmentation violation at the
point were a memory under/over-run occurs. - Use your favorite debugger to determine location of memory
under/over-run.
Enjoy,
Jens