hitting size limit (or whatever), gcc
Hya,
I am inventing wheel here. If anybody else is hitting similar problem, hopefully this post helps. I am sure that this is some sort of size limit related. The code below compiles, but runs into SegFault. Code:
int main(int argc, char** argv, char** envv){ My system is Debian squeeze, gcc version 4.4.5 (Debian 4.4.5-8). It took quite a while for me to figure out, so I am posting here. Happy Penguins! |
Self reply,
If anybody knows how to detect this problem, please post here. |
Hi -
Try compiling with "-fstack-check" and see what happens: http://gcc.gnu.org/onlinedocs/gcc/Co...de-Gen-Options And/or "-fstack-protector-all": http://gcc.gnu.org/onlinedocs/gcc/Op...timize-Options 'Hope that helps |
The problem is stack overflow.
Quote:
Or do you want to correct the stack overflow? You can use the ulimit command to change the initial stack size. |
Hya,
Thanks for replies, however... Code:
>cat error.c I would prefer using pointer to using getrlimit(), setrlimit() and sysconf(). At least, I know where to check next time. Thanks again. Happy Penguins! |
All times are GMT -5. The time now is 06:25 PM. |