bug-gnulib
[Top][All Lists]
Advanced

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

freelocale woes


From: Bruno Haible
Subject: freelocale woes
Date: Sun, 16 Oct 2016 20:01:50 +0200
User-agent: KMail/4.8.5 (Linux/3.8.0-44-generic; KDE/4.8.5; x86_64; ; )

Hi Paul,

You wrote in
<http://lists.gnu.org/archive/html/bug-gnulib/2016-03/msg00034.html>

  Don't call freelocale on a locale
  that was the base of a successful newlocale, as that
  results in a double free.

On which system was this? I'm asking because

  - In the glibc implementation (freelocale and _nl_remove_locale),
    I can see that shared data between locales is protected by usage counts.

  - glibc hasn't changed in this area since 2009.

  - If freelocale() really is transitive, how would a programmer proceed
    if he has dependencies between locale objects

              A  -->  C
              B  -->  C

    and he wants to free B but keep A ?

Bruno
--
In memoriam Thet Win Aung <http://en.wikipedia.org/wiki/Thet_Win_Aung>




reply via email to

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