彭洪勇
2013-Apr-27 17:09 UTC
[LLVMdev] initializer for function local static variable called enclosing function
Hello, Today I encountered a problem when viewing some code. When executing the complied binary it aborted and give the error message. "initializer for function local static variable called enclosing function" The code is like this, static bool isDumpEnabled = getenv("env_dump_something") ! = 0 When executing this code, this error occurred once. But I don't know why. I had a look at the code in this page, http://www.opensource.apple.com/source/libcppabi/libcppabi-26/src/cxa_guard.cxx It seems the error is because that initializing static variable twice in one thread. Is that possible, or it is a optimization error for llvm? Any tips are welcome! -- You'll succeed if you try your best. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130428/bc0a07d1/attachment.html>