|
From: | Melvin Mawhin |
Subject: | Re: Infinite loop generating QEMU docs after upgrade to Perl 5.28.0 |
Date: | Sat, 30 Jun 2018 19:43:49 +0000 |
Hi,
This patch works very well.
Kr Mel From: Niko Tyni <address@hidden>
Sent: Saturday, June 30, 2018 8:27 PM To: address@hidden Cc: Gavin Smith; Melvin Mawhin Subject: Re: Infinite loop generating QEMU docs after upgrade to Perl 5.28.0 Hi, I believe I've found the issue with makeinfo on Perl 5.28.
Aside from the trivial unescaped left brace things, there's a change in locale handling that can indeed cause a busy loop for some inputs under non-UTF8 locales. I've been able to reduce the necessary input to just two lines: @documentencoding UTF-8 @indicateurl{foo} The busy loop happens in xspara__add_next() (Texinfo::Convert::XSParagraph) when mbrtowc(3) returns -1, indicating an invalid multibyte sequence even though it is valid UTF-8. Perl 5.28 introduced thread-safe locales, where setlocale() only affects the locale of the current thread. Apparently external code like mbrtowc(3) isn't aware of this thread specific locale without special handling. I'm attaching a patch that fixes this for me, and another one for the necessary left brace escaping. Even with this, I suppose xspara.c could use some mbrtowc(3) return value checks. Some pointers: https://nam04.safelinks.protection.outlook.com/?url=""> https://nam04.safelinks.protection.outlook.com/?url=""> https://nam04.safelinks.protection.outlook.com/?url=""> https://nam04.safelinks.protection.outlook.com/?url=""> Hope this helps, -- Niko Tyni address@hidden |
[Prev in Thread] | Current Thread | [Next in Thread] |