This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
segmentation fault in main() when -fstack-check
- From: "gregry ." <gregry_7 at yahoo dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 9 Jul 2007 10:43:13 -0700 (PDT)
- Subject: segmentation fault in main() when -fstack-check
I have some concerns about Linux (2.4 based kernel)
and stack usage, in particular with multithreaded
programs. Per the gcc documentation, the compile
option -fstack-check should be used with multithreaded
programs so that the OS can reliably tell when an
arbitrary thread's stack space is being extended.
However, it seems that whenever I specify the
-fstack-check option, the compiled program will not
run. It instead seg faults when main() is called.
Should this compiler option be used on my platform?
Platform: Suse 9.0 (x86 2.4.21 kernel), gcc 3.3.1,
multithreading using the pthread library.
____________________________________________________________________________________
Luggage? GPS? Comic books?
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz