[LLVMbugs] [Bug 19491] New: Program crash due to mixed constant/dynamic static initialization
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Apr 19 12:14:23 PDT 2014
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: unassignedclangbugs at nondot.org
Reporter: kevin at kevinlocke.name
CC: llvmbugs at cs.uiuc.edu
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140419/f3a2fb7c/attachment.html>
More information about the llvm-bugs
mailing list