http://llvm.org/bugs/show_bug.cgi?id=19491
Bug ID: 19491
Summary: Program crash due to mixed constant/dynamic static
initialization
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
As discussed in the thread on cfe-dev starting at
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-April/036279.html with better
isolation of the issue in
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-April/036287.html if a common
variable is initialized as a constant in one translation unit and dynamically
in another, linking those units together will result in the program crashing
during initialization (with EXC_BAD_ACCESS on OS X).
The only instances of this behavior that I am aware of are due to user error,
either incorrectly defining common variables or using incompatible compiler
settings for different translation units. However, since it will occur when
two translation units use the boost library and are compiled with and without
-std=c++11 respectively, I would expect that the error is not uncommon and is
an instance where spending the effort to avoid the error or better handle it
would be worth the effort.
Richard Smith laid out a potential solution in
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-April/036336.html I'm not sure
to what extent it may have already been considered or be on the roadmap, but I
wanted to file this bug so that other interested users and developers could
follow the progress on the issue (and more easily find a description of the
issue if they encounter it).
Thanks,
Kevin
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs