develooper Front page | perl.perl5.porters | Postings from April 2019

[perl #133928] POSIX::mblen() broken on threaded perls with glibc

Thread Next
From:
James E Keenan via RT
Date:
April 2, 2019 21:38
Subject:
[perl #133928] POSIX::mblen() broken on threaded perls with glibc
Message ID:
rt-4.0.24-32137-1554241106-120.133928-15-0@perl.org
On Tue, 26 Mar 2019 19:56:17 GMT, public@khwilliamson.com wrote:
> On 3/26/19 1:26 PM, Niko Tyni wrote:
> > On Mon, Mar 25, 2019 at 02:14:35PM -0700, karl williamson via RT wrote:
> > 
> >> I need to apologize to Niko.  He had figured things out, and indeed his
> >> program is virtually the same as mine.  When I first read it, I didn't
> >> really understand the issue, and when I did understand it, I forgot to
> >> read the program again.  If I had, it would have saved me some effort.
> > 
> > Oh, no need to apologize! I could certainly have explained things clearer,
> > and must admit I was still a bit hazy on details at that point.
> > 
> > Too bad for the duplicate work, but I'm glad we arrived at the same
> > conclusion :)
> > 
> >> In thinking about it since, I'm unsure fhat openbsd needs to look at the
> >> third argument.  In their system there are only two locales (and you can
> >> see that in the trace as they are numbered 1 and 2).  One locale has all
> >> categories be C.  The other locale has LC_CTYPE be C.UTF-8.  To
> >> implement this properly, all one has to do is see if the mask parameter
> >> includes LC_CTYPE.  If not, do nothing.  If so, set the locale to 1 or 2
> >> depending on if the new name ends with UTF-8.  I believe this has the
> >> same effect as if one were to take into account the third parameter.
> > 
> > FWIW I also think this would work.
> > 
> > I guess the mb.t tests added in this ticket could use a skip/todo for
> > openbsd for as long as it has the current behaviour? See attached.
> > 
> 
> I'm thinking that this bug in OpenBSD necessitates us not using the 
> POSIX 20008 calls, so I'll either change the hints file, or if this is a 
> problem on other systems too, write a Configure probe.
> 
> In either event, these tests will start working without having to change 
> them.

Among our smoke-testing rigs ext/POSIX/t/mb.t is still experiencing failures on 2 OSes.  See:

http://perl5.test-smoke.org/submatrix?test=../ext/POSIX/t/mb.t&pversion=5.29.10

Examples:

OpenBSD-6.4: http://perl5.test-smoke.org/report/83977
HP-UX B.11.23/64: http://perl5.test-smoke.org/report/83901
-- 
James E Keenan (jkeenan@cpan.org)

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=133928

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About