[omniORB] Unexpected Seg Fault

Duncan Grisby dgrisby@uk.research.att.com
Thu, 06 Dec 2001 12:14:47 +0000


On Thursday 6 December, Attila Pletyak wrote:

> Has anybody ever used or have experience with this njamd? I've tried to
> use it but after starting my app it started to write a lot of error on
> the screen, when I directed it into a file on of my binaries made a 156
> Mb large log file in 1 minute...

What do the errors say?

I've used it to track down bugs in omniORB itself. I use it within
gdb. I have a file called njamd, containing

set env NJAMD_DUMP_LEAKS_ON_EXIT=3
set env NJAMD_TRACE_LIBS=1
set env NJAMD_ALLOW_MALLOC_0=1
set env NJAMD_ALLOW_FREE_0=1
set env LD_PRELOAD=libnjamd.so

then to use it, fire up gdb:

  $ gdb ./foo
  ...
  (gdb) source njamd
  (gdb) run

Then if the program does something bad, like running off the end of an
allocation, its gets stopped in gdb immediately and you can look at
what went wrong.

Cheers,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --