0

Using valgrind with a program, it shows
==940== to suppress, use: --max-stackframe=48000588 or greater
==940== Invalid write of size 4
==940== at 0x80499EC: sequencer_run (stdio2.h:105)
==940== by 0x804DEF6: thread_start (thread.c:105)
==940== by 0x8049072: main (genome.c:237)
==940== Address 0xbbd51340 is on thread 1's stack

By using the max-stackframe option, the error is suppressed. But how do i modify the max-stackframe size with gcc? I tried using
#define STACK_CHECK_MAX_FRAME_SIZE 48000588

But didnt work. I think i am going the wrong way. Please help.

ceedee
  • 227
  • 1
  • 4
  • 13
  • That's not a property of the binary file, it's a runtime property limited by the OS (or in this case valgrind). I don't believe you can modify this at compile time. – Mat Aug 27 '13 at 13:22
  • possible duplicate of [Change stack size for a C++ application in Linux during compilation with GNU compiler](http://stackoverflow.com/questions/2275550/change-stack-size-for-a-c-application-in-linux-during-compilation-with-gnu-com) – nmaier Aug 27 '13 at 13:34
  • @Mat Can you suggest a way out? Why should this be happening? – ceedee Sep 07 '13 at 12:35
  • The way out is to use `--max-stackframe` for valgrind, or the other options in the linked question. It's happening because stack is a limited resource. – Mat Sep 07 '13 at 12:38

0 Answers0