There is an acknowledged bug in Cygwin's implementation of wcsxfrm() [1] that can cause heap corruption in certain cases. This bug has since been fixed in Cygwin 2.8.1-1 [2] and all current and future releases. However, that was relatively recent (July 2017) so it may still crop up.
I also have a workaround for this from the Python side, but rather than clutter the code with workarounds for platform-specific bugs I think it suffices just to skip the test in this case.
[1] https://cygwin.com/ml/cygwin/2017-05/msg00149.html
[2] https://cygwin.com/ml/cygwin-announce/2017-07/msg00002.html |