simple multithread program fails on Cygwin, succeeds on Linux

Corinna Vinschen corinna-cygwin@cygwin.com
Mon Aug 10 11:30:00 GMT 2009


On Aug 10 12:13, Bruno Haible wrote:
> Hi,
>> The attached test program for pthread_once uses the following basic POSIX
> threads functions:
> pthread_create
> pthread_join
> pthread_mutex_init
> pthread_mutex_lock
> pthread_mutex_unlock
> pthread_once
> pthread_rwlock_init
> pthread_rwlock_rdlock
> pthread_rwlock_unlock
> pthread_rwlock_wrlock
>> On Linux with glibc 2.8:
> $ gcc bug.c -O -Wall -lpthread -o bug
> $ ./bug
> Starting test_once ... OK
> The test completes in about 4 seconds.
>> On Cygwin 1.5.25(0.156/4/2):
> $ gcc bug.c -O -Wall -o bug.exe 
> $ ./bug.exe
> Starting test_once ...
> Either it does not terminates (still running after half an hour, eating
> 100% CPU time on one of the two CPUs), or it crashes rather quickly:
> $ ./bug.exe
> Starting test_once ...Segmentation fault (core dumped)

WJFFM under Cygwin 1.7.
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


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /