bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: test results on Cygwin


From: Bruno Haible
Subject: Re: test results on Cygwin
Date: Tue, 6 Apr 2010 02:01:43 +0200
User-agent: KMail/1.9.9

> Failures on Cygwin 1.7.2
> ------------------------
> 
> test-mbsnrtowcs.c:181: assertion failed
> ./test-mbsnrtowcs2.sh: line 15:  5708 Aborted                 (core dumped) 
> LC_ALL=$LOCALE_FR_UTF8 ./test-mbsnrtowcs${EXEEXT} 2
> FAIL: test-mbsnrtowcs2.sh
> 
> test-mbsrtowcs.c:181: assertion failed
> ./test-mbsrtowcs2.sh: line 15:  4428 Aborted                 (core dumped) 
> LC_ALL=$LOCALE_FR_UTF8 ./test-mbsrtowcs${EXEEXT} 2
> FAIL: test-mbsrtowcs2.sh

These look like a programming error in the testcase or like a gcc bug.
A simplified test case is attached. It crashes when optimized with -O2
and works fine without optimization:


$ gcc foo.c && ./a.exe
gcc foo.c && ./a.exe
buf = FACE FACE FACE FACE FACE FACE FACE FACE FACE FACE
state = 0000000000000000
buf = FACE FACE FACE FACE FACE FACE FACE FACE FACE FACE
state = 01000000C3000000
buf = FACE FACE FACE FACE FACE FACE FACE FACE FACE FACE
state = 01000000C3000000
temps = 00000000C3000000
buf = 00FC 00DF FACE FACE FACE FACE FACE FACE FACE FACE
state = 00000000C3000000

$ gcc -O2 foo.c && ./a.exe
gcc -O2 foo.c && ./a.exe
buf = FACE FACE FACE FACE FACE FACE FACE FACE FACE FACE
state = 0000000000000000
buf = FACE FACE FACE FACE FACE FACE FACE FACE FACE FACE
state = 01000000C3000000
buf = FACE FACE FACE FACE FACE FACE FACE FACE FACE FACE
state = 01000000C3000000
temps = 00000000C3000000
buf = 00FC 00DF FACE FACE FACE FACE FACE FACE FACE FACE
state = 6100000000D4CD22
foo.c:103: assertion failed
bash: [5936: 1] tcsetattr: Inappropriate ioctl for device
Aborted (core dumped)

The same behaviour also occurs when the test case uses the gnulib replacement
of mbsrtowcs. Therefore I think it's not a bug in Cygwin's mbsrtowcs function.

Can someone please look at the attached test case and see if it does something
obviously wrong?

Bruno



Attachment: foo.c
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]