|
From: Nicholas N. <nj...@cs...> - 2005-03-18 16:58:36
|
On Fri, 18 Mar 2005, Boris Mansencal wrote: > I am using current Valgrind version from CVS (on a Fedora Core 1 or 3 system, > Intel P4). > > Valgrind with Memcheck (or Addrcheck or even Massif) does not see any of my > memory allocation ! > It always reports : > ==11522== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) > ==11522== malloc/free: in use at exit: 0 bytes in 0 blocks. > ==11522== malloc/free: 0 allocs, 0 frees, 0 bytes allocated. > ==11522== For counts of detected errors, rerun with: -v > ==11522== No malloc'd blocks -- no leaks are possible. > > I use option : --leak-check=yes. > I have only one processus (so no need to use --trace-children=yes as reported > in the FAQ). > > On a very sinple program valgrind do report memory allocation. > But It does not on my main application. > I have not yet found a simple test case that reproduce this odd behavior. > > Any idea ? You haven't told us anything about your program. In your Massif output you have these lines: ==23355== --alloc-fn=memory_alloc ==23355== --alloc-fn=memory_calloc ==23355== --alloc-fn=memory_realloc Does your program use a custom allocator, rather than the standard malloc()? If so, you'll have to use the client requests for these (see the manual sections 2.7 and 3.7). The --alloc-fn option is for indicating when functions wrap functions that do allocation. > Besides, Valgrind with Massif sometime dies on the same application. > Here is the output : > [...] > --23355-- allocs: 0 > --23355-- INTERNAL ERROR: Valgrind received a signal 8 (SIGFPE) - exiting > --23355-- si_code=1 Fault EIP: 0xF6DB4FD3; Faulting address: 0xF6DB4FD3 > --23355-- esp=0xF050AF20 That's a bug, although it only occurs with -v so it's not critical. I'll fix it over the weekend. N |