This is the mail archive of the cygwin mailing list for the Cygwin 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]

Cygwin 1.7 pthread hides segmentation fault


It seems that segfaults go unreported using pthread and Cygwin 1.7.33-2.

Here is a minimal code piece to reproduce:

#include <pthread.h>

void* thread_run(void* _) {
        int *p = 0;
        *p = 1;
        return NULL;
}

int main(int argc, char** argv) {
        pthread_t t1;
        pthread_create(&t1, NULL, thread_run, NULL);
        pthread_join(t1, NULL);
        return 0;
}

Simply compiled with gcc -pthread, and the result executable returns 0
without reporting segmentation fault.

Could this be a bug?

Happy new year & regards,
Howard

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


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