summaryrefslogtreecommitdiffstats
path: root/contrib/libc++
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-10-09 18:21:45 +0000
committerdim <dim@FreeBSD.org>2015-10-09 18:21:45 +0000
commit7f7d0087c01663f303a253ebc02bd73bdd04764c (patch)
tree752ccb6bd9d3cac251c8e68ec01da8d795acddf7 /contrib/libc++
parentac41e8b0a6a86647d95d96654473088399a00a56 (diff)
downloadFreeBSD-src-7f7d0087c01663f303a253ebc02bd73bdd04764c.zip
FreeBSD-src-7f7d0087c01663f303a253ebc02bd73bdd04764c.tar.gz
Temporarily revert upstream llvm trunk r240144 (by Michael Zolotukhin):
[SLP] Vectorize for all-constant entries. This should fix libc++'s iostream initialization SIGBUSing on amd64, whenever the global cout symbol is not aligned to 16 bytes. Some further explanation: libc++'s iostream.cpp contains the definitions of std::cout, std::cerr and so on. These global objects are effectively declared with an alignment of 8 bytes. When an executable is linked against libc++.so, it can sometimes get a copy of the global object, which is then at the same alignment. However, with clang 3.7.0, the initialization of these global objects will incorrectly use SSE instructions (e.g. movdqa), whenever the optimization level is high enough, and SSE is enabled, such as on amd64. When any of these objects is not aligned to 16 bytes, this will result in a SIGBUS during iostream initialization. In contrast, clang 3.6.x and earlier took the 8 byte alignment into consideration, and avoided SSE for those particular operations. After bisecting of upstream changes, I found that the above revision caused the change of this behavior, so I am reverting it now as a workaround, while a discussion and test case is being prepared for upstream.
Diffstat (limited to 'contrib/libc++')
-rw-r--r--contrib/libc++/src/iostream.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/libc++/src/iostream.cpp b/contrib/libc++/src/iostream.cpp
index e073aec..9a82e27 100644
--- a/contrib/libc++/src/iostream.cpp
+++ b/contrib/libc++/src/iostream.cpp
@@ -86,3 +86,4 @@ ios_base::Init::~Init()
}
_LIBCPP_END_NAMESPACE_STD
+
OpenPOWER on IntegriCloud