X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Fri, 10 Feb 2012 17:30:53 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: cygwin > 1.7.9: Segmentation faults / STATUS_STACK_OVERFLOW Message-ID: <20120210163053.GC4843@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <0C11C5BF0B29FD43A8D0250F711D497F89E1DD585C AT ex01-ubitronix DOT ubitronix DOT local> <20120207164548 DOT GD3178 AT calimero DOT vinschen DOT de> <0C11C5BF0B29FD43A8D0250F711D497F89E1DD5886 AT ex01-ubitronix DOT ubitronix DOT local> <20120210162458 DOT GB4843 AT calimero DOT vinschen DOT de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20120210162458.GB4843@calimero.vinschen.de> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Feb 10 17:24, Corinna Vinschen wrote: > Other than that, you can change the pthread stacksize since 1.7.10. Try > this: > > > int main(void) > > { > > int ret; > > puts("Starting test"); > > > > #if 0 > > // Working fine if called in the main thread. > > callGlob(NULL); > > #else > > // Not working if called in another thread. > > pthread_attr_t attr; > pthread_attr_init (&attr); > pthread_attr_setstacksize (&attr, 1024 * 1024); > > > ret = pthread_create(&threadId, NULL, callGlob, NULL); Oops, sorry, you have to change the pthread_create call so that it uses attr, of course: ret = pthread_create (&threadId, &attr, callGlob, NULL); Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- 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