Re: Solaris 11 Sparc crash in std::call_once

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

 



On Tue, Aug 21, 2018 at 5:08 AM, Jeffrey Walton <noloader@xxxxxxxxx> wrote:
> Hi everyone,
>
> I have some boilerplate call_once code that sets a few function pointers:
>
>     std::once_flag s_flag;
>     InitializeInteger::InitializeInteger()
>     {
>         std::call_once(s_flag, []() {
>             SetFunctionPointers();
>         });
>     }

Cancel... It looks like there are a lot of bad interactions with
libstdc++, glibc and pthreads. Cf.,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146.

We are going to move onto to something else. Since we are only writing
function pointers an old doubled-checked init should work fine. It
does not matter if the function pointer gets written twice during the
first race (if it occurs).

Jeff



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux