raise(-1) has stopped returning an error recently

Corinna Vinschen corinna-cygwin@cygwin.com
Wed Nov 24 09:25:46 GMT 2021


On Nov 24 09:36, Duncan Roe wrote:
> On Tue, Nov 23, 2021 at 11:18:25AM -0700, Brian Inglis wrote:
> > > On Nov 23 19:27, Duncan Roe wrote:
> > > > Btw to whoever maintains grep for cygwin: 'make check' should pass on
> > > > next release (I patched out the surrogate-pair failre).
> >
> > I had no problems with test-raise last release.
> 
> I don't remember having a problem with it even a few weeks ago.
> 
> > I did with surrogate pairs but after spending too much time on all the test
> > infrastructure around that, decided it was a low probability event, and wait
> > until anyone complains to refer it upstream.
> 
> I wasted time on that too. That's why I patched surrogate-pair to not do its 3rd
> test if 'uname -s' indicates Cygwin.
> 
> For the full story, see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27555#5

What is that "permanent restriction" in Cygwin?  Is that something we
could fix or something unfixable?  Did you try to debug Cygwin in terms
of that problem?  If not, could you extract a reduced, very simple
stand-alone testcase for further debugging?

> > Do Cygwin and/or Windows support surrogate pairs in UTF-8?

You mean UTF-16.  UTF-8 doesn't know surrogate pairs, UTF-16 does.
Originally there was UCS-2, 16 bits, with only 65536 code points.
However, Unicode left the BMP already with version 2.0 in 1996, so
UTF-16 and surrogate pairs became necessary.  Windows as well as Cygwin
support them.

> There are 3 tests in surrogate-pair and only the 3rd one failed. So I guess
> surrogate pairs in UTF-8 "mostly work".

UTF-16.  The surrogate stuff is evil at times.  Have a look at the
__utf8_wctomb function in
https://sourceware.org/git/?p=newlib-cygwin.git;a=blob;f=newlib/libc/stdlib/wctomb_r.c
Lone surrogate halfs in an input stream are a problem, for instance.


Corinna


More information about the Cygwin mailing list