I have been working on an open source project for awhile, http://gtkworkbook.sourceforge.net/, and recently ran into an issue that just seems like I am going in circles. I'm pretty sure there is a heap problem but I have been looking at this code too long to figure out exactly what it is.
So, in brief, what I am doing is reallocating a...
I generate a makefile using qmake and then pass the following arguments to valgrind
valgrind --tool=memcheck --leak-check=yes filename inputfilename
where filename is the name of the executable generated and inputfilename is the name of the input file required as input for the executable
Instead of getting any output related to th...
I was wondering what experiences you have had using instrumentation tools with managed C++?
PIN: http://www.pintool.org/
Valgrind: http://www.valgrind.org
Thanks.
...
I have a highly parallel Windows program that uses lots of threads, hand-coded machine synchronization instructions, and home-rolled parallel-safe storage allocators. Alas, the
storage management has a hole (not a synchonization hole in the allocators,
I'm pretty sure) and I'd like to find it.
Valgrind has been suggested as a good tool...
Hi,
I have used valgrinds massif tool to monitor memory usage in the past.
Does anyone know how to capture memory use of php processes that are spawned on a linux lighttpd server?
I have found that Valgrind can not attach to a prerunning process (and I would not know the PID of the php process before hand anyway)
I only see lighttpd...
Helgrind is a Valgrind tool for
detecting synchronisation errors in C,
C++ and Fortran programs that use the
POSIX pthreads threading primitives.
Anyone knows an equivalent tool for windows? After googling a bit I haven't found anything...
...
My program is like this (main.c):
#include <stdlib.h>
#include <stdio.h>
void main(){
char *first="hello ";
char *second="world!";
char *seq=(char *)malloc((strlen(first)+1)*sizeof(char));
strcat(strcpy(seq,first),second);
printf("%s\n",seq);
free(seq);
}
and I debug with the tool valgrind, it said that($:valgrind --tool=m...
Which one is better on Linux? Valgrind or Purify
What is your opinion of using them?
...
Hi All,
how do i do a valgrind memcheck on every instance of Process without starting it via valgrind command options.
Is there a way to keep the monitoring options saved on a process rather than starting up the process every-time with valgrind command?
In Microsoft Application Verifier if an application is specified to be monitored, ...
Hi
I am using valgrind-cachegrind for my L2 cache bottlenecks and below is a single line output of the command
valgrind --tools=cachegrind EXECUTABLE
Output:
==3420== Cachegrind, an I1/D1/L2 cache profiler.
==3420== I refs: 104,260,064,149
==3420== I1 misses: 1,678,402
==3420== L2i misses: 227,620
==3...
I have these structs:
typedef struct _Frag{
struct _Frag *next;
char *seq;
int x1;
int length;
}Frag;
typedef struct _Fragment{
int type;
Frag *frag_list;
}Fragment;
And then I created a array
Fragment *fragments=malloc(1,sizeof(Fragment)); // or more
fragments->frag_list=malloc(1,sizeof(Frag)); // or more
Frag *...
Hi,
I have a class A as follows:
class A
{
public:
A()
{
printf("A constructed\n");
}
~A();
//no other constructors/assignment operators
}
I have the following elsewhere
A * _a;
I initalize it with:
int count = ...
...
_a = new A[count];
and I access it with
int key = ....
....
I am writing a python extension that seems to be leaking memory. I am trying to figure out the soure of the problem using valgrind.
However, it seems that python itself is leaking memory according to valgrind. Using the following simple script:
hello.py
print "Hello World!"
and doing
> valgrind --tool=memcheck python ./hello.py...
I use getpwnam_r to handle client connections in my programs. Sadly enough, it seems to allocate a buffer it never frees.
The relevant valgrind output:
==15774== 536 (104 direct, 432 indirect) bytes in 2 blocks are definitely lost in loss record 1 of 3
==15774== at 0x4C24CFE: malloc (in /usr/lib64/valgrind/amd64-linux/vgpreload_memc...
I'm writing a Valgrind tool and in the instrumented code I need to pass the guest's stack pointer to a dirty function. What I'm currently doing to get the stack pointer is this:
IRTemp temp = newIRTemp (sbOut->tyenv, gWordTy);
addStmtToIRSB (sbOut,
IRStmt_WrTmp (temp,
IRExpr_Get (offsetof (Ve...
Hi,
I need to use Valgrind to detect any memory access violations made in a server application. The server creates many threads. I suspect that there is a racing condition that causes the server to crash every 1 hour or so. We used Valgrind to analyze its memory usage but the server process' speed decreased dramatically. The server's sp...
Hello,
How much valid are the valgrind logs showing invalid accesses and data races,when running it in virtual machine and not in a native linux system. The reason being,in a virtual machine,everything is virtual.
...
I've tried to debug memory crash in my Python C extension and tried to run script under valgrind. I found there is too much "noise" in the valgrind output, even if I've ran simple command as:
valgrind python -c ""
Valgrind output full of repeated info like this:
==12317== Invalid read of size 4
==12317== at 0x409CF59: PyObject_Fre...
I'm quite new in using valgrind. I'm running tests for my C library. I've tryed to run it under valgrind and got some very valuable info about possible errors in my code. One thing that bothers me is beginning of every valgrind session is full of messages like this:
DWARF2 CFI reader: unhandled CFI instruction 0:22
IIUC it's unrelated...
Valgrind tells me function xxx allocated memory which was not freed. Fine. It's proving more difficult than usual to trace however.
To this end I have created numerous:
#ifdef DEBUG
fprintf(stderr, "something happening:%lx\n", (unsigned long)ptr);
#endif
So I just need to match these ptr addresses that are displayed with the addresse...