[compiler-rt] r204173 - [sanitizer] Fix a bug in AdjustStackSize().
Sergey Matveev
earthdok at google.com
Tue Mar 18 12:48:48 PDT 2014
Author: smatveev
Date: Tue Mar 18 14:48:48 2014
New Revision: 204173
URL: http://llvm.org/viewvc/llvm-project?rev=204173&view=rev
Log:
[sanitizer] Fix a bug in AdjustStackSize().
If the user requests OS default stack size, do not adjust it to our minimum
stack size (which is usually much less than the OS default).
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc?rev=204173&r1=204172&r2=204173&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc Tue Mar 18 14:48:48 2014
@@ -437,10 +437,11 @@ void AdjustStackSize(void *attr_) {
const uptr minstacksize = GetTlsSize() + 128*1024;
if (stacksize < minstacksize) {
if (!stack_set) {
- if (stacksize != 0)
+ if (stacksize != 0) {
VPrintf(1, "Sanitizer: increasing stacksize %zu->%zu\n", stacksize,
minstacksize);
- pthread_attr_setstacksize(attr, minstacksize);
+ pthread_attr_setstacksize(attr, minstacksize);
+ }
} else {
Printf("Sanitizer: pre-allocated stack size is insufficient: "
"%zu < %zu\n", stacksize, minstacksize);
More information about the llvm-commits
mailing list