|
From: Ashley P. <api...@co...> - 2007-05-10 16:02:10
|
On Wed, 2007-05-09 at 10:13 -0500, Ravi Sharma wrote: > Hi All, > I am using valgrind for the first time and may be this is a silly > question but would appreciate if someone can answer. > > My code is basically a scientific application which needs a lot of > stack size. I set stack to unlimited using ulimit -s command. After > this my program runs large cases just fine if run without valgrind. > > Before increasing the stack, the program used to segfault inside a > subroutine. Running it with valgrind showed invalid read/writes at > places which do not access any invalid location. > > The problem is that even after increasing the stack size, valgrind > gives the same errors and the program segfaults at the same location > as it used to when stack size was less. Is ulimit -s not applicable > when running programs with valgrind? This thread might be of help to you, there is a 16mb limit on stack size within valgrind and even below this it can get confused if you allocate large objects on the stack, have a look at the documentation for --max-stackframe=<size> http://thread.gmane.org/gmane.comp.debugging.valgrind/6375 Ashley, |