This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]