Created attachment 849788 [details] Reproducer program ftell gets stuck in an infinite loop when it is called after an fputsw (obviously for wide characters) and the buffer is not full, but does not have enough space to convert the current wide character. How Reproducible: Always Steps to Reproduce: Build and run attached reproducer. Actual Behaviour: Infinite loop Expected behaviour: Program returns.