develooper Front page | perl.perl5.changes | Postings from March 2019

[perl.git] branch smoke-me/khw-locale created.v5.29.8-154-g8e1adfe460

Karl Williamson
March 21, 2019 05:12
[perl.git] branch smoke-me/khw-locale created.v5.29.8-154-g8e1adfe460
Message ID:
In perl.git, the branch smoke-me/khw-locale has been created


        at  8e1adfe46003f8ffd0d44db41765d839063ea0fc (commit)

- Log -----------------------------------------------------------------
commit 8e1adfe46003f8ffd0d44db41765d839063ea0fc
Author: Karl Williamson <>
Date:   Wed Mar 20 22:59:39 2019 -0600

    locale.c: Don't try to recreate the LC_ALL C locale
    On threaded perls, we create a locale object for LC_ALL "C" during early
    in the startup phase.  When the user asks for that locale, we can just
    switch to it instead of trying to create a new one.
    Doing the creation worked, but ended up with a memory leak.  My guess is
    that it's a bug in glibc newlocale.c, in which it discovers it doesn't
    need to create the locale, and then does a short-circuit return, failing
    to do the free of its other parameter.  I looked at the leak and added a
    print statement on the next line after the newlocale that was calling
    the malloc that leaked.  And in every case, the program did the right
    thing to free the memory.  So I conclude it's a but in the library.
    But it's better to try not to create a new locale when we already have
    one anyway, and this causes the bug to go away.

commit 484a9f7c4aaa19cbfca844a33b0d4b2a7fc5b201
Author: Karl Williamson <>
Date:   Wed Mar 20 22:58:38 2019 -0600

    Add, improve some debugging stmts for -DL (locales)

commit c3a6c4fde7dec2af2a8cd15be50202b43f74843d
Author: Karl Williamson <>
Date:   Fri Feb 23 11:18:56 2018 -0700

    XXX combine with something else pp.c: Add blank line


Perl5 Master Repository Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About