delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/01/04/21:15:58

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:from:date:message-id:subject:to
:content-type; q=dns; s=default; b=TVR5+ISCMispRtxttV/VyLKFBBX8T
LXwb/1OYJ0gP/x0PXsTgk8HhXZNyZ3hz9XzxySdBY+IlK1dfhxpe67EZWExeaM7j
bBT9X2l24vj2E9vovpaFBuPcHGSl/g+z5hEtN8JyHygdr4BccR7BRsyHdFVbJiSI
pTuvd9XHu/ewiw=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:from:date:message-id:subject:to
:content-type; s=default; bh=0lUs+sIjFeLWJbxkjZ7RkOZ1pes=; b=ZMc
A8FkaFh2ha3NtE1z0o1NxG+hVpc5c+C5jP8VXOE0Z5pCD6tD+IZX2VbxBivWHiOy
JlasUTNRQic6DS7+a1lx+fh9a/r+zvbsaKEEmXH5+wEY0eMHPdAgdjzfjjTOWKm9
LCHo+ZnBB5oPJrcQ4uV+4+ygbwieI/rIwzHyhbw0=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=0.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-la0-f45.google.com
X-Received: by 10.112.126.165 with SMTP id mz5mr67727293lbb.67.1420424109186; Sun, 04 Jan 2015 18:15:09 -0800 (PST)
MIME-Version: 1.0
From: Howard Guo <guohouzuo AT gmail DOT com>
Date: Mon, 5 Jan 2015 10:14:49 +0800
Message-ID: <CAHSE2Wcm6WvmA-rtdgQ=5NuQnWwhes9iGn8fZj15YSzYF8GmLw@mail.gmail.com>
Subject: Cygwin 1.7 pthread hides segmentation fault
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019