This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Windows DEP problem with nested functions
- From: Nicholas Sherlock <n dot sherlock at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 07 May 2008 22:02:54 +1200
- Subject: Windows DEP problem with nested functions
Hi all,
I'm using GCC 3.4.4 on Cygwin on Windows XP. The following program:
#include <pthread.h>
int main() {
pthread_t thread;
void * task(void * arg) {
return NULL;
}
pthread_create(&thread, NULL, task, NULL);
pthread_join(thread, NULL);
return 0;
}
only runs if DEP (Prevention of code execution on data pages) is turned
off in Windows settings. I get a segfault if DEP is turned on. Is this a
GCC problem, or a Cygwin problem?
Cheers,
Nicholas Sherlock