[llvm-bugs] [Bug 39233] Segfault on initialization of class static variable with explicit instantiation

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Oct 9 13:42:29 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=39233

Richard Smith <richard-llvm at metafoo.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|NEW                         |RESOLVED
                 CC|                            |richard-llvm at metafoo.co.uk

--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
This is a bug in your code. There is no guarantee that <iostream> is
initialized before the global initializer for Bar<false>::dummy runs, and it
just so happens that Bar<false>::dummy is initialized before std::cout is
initialized in this case, resulting in your logging output crashing.

*** This bug has been marked as a duplicate of bug 38914 ***

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181009/ed2fafd5/attachment.html>


More information about the llvm-bugs mailing list