[Top][All Lists]

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

Re: Infinite loop generating QEMU docs after upgrade to Perl 5.28.0

From: Niko Tyni
Subject: Re: Infinite loop generating QEMU docs after upgrade to Perl 5.28.0
Date: Sat, 30 Jun 2018 21:27:11 +0300
User-agent: Mutt/1.10.0 (2018-05-17)

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

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:


Hope this helps,
Niko Tyni   address@hidden

Attachment: 0001-Update-locale-handling-for-Perl-5.28.patch
Description: Text Data

Attachment: perl-528-fixes
Description: Text document

reply via email to

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