This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Cygwin 1.7 pthread hides segmentation fault
- From: Howard Guo <guohouzuo at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Mon, 5 Jan 2015 10:14:49 +0800
- Subject: Cygwin 1.7 pthread hides segmentation fault
- Authentication-results: sourceware.org; auth=none
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