[PATCH] D57866: [safestack] Don't crash if stack size is not aligned as expected
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 7 14:25:55 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL353475: [safestack] Don't crash if stack size is not aligned as expected (authored by vitalybuka, committed by ).
Herald added a subscriber: delcypher.
Changed prior to commit:
https://reviews.llvm.org/D57866?vs=185671&id=185869#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57866/new/
https://reviews.llvm.org/D57866
Files:
compiler-rt/trunk/lib/safestack/safestack.cc
Index: compiler-rt/trunk/lib/safestack/safestack.cc
===================================================================
--- compiler-rt/trunk/lib/safestack/safestack.cc
+++ compiler-rt/trunk/lib/safestack/safestack.cc
@@ -228,7 +228,7 @@
}
SFS_CHECK(size);
- SFS_CHECK((size & (kStackAlign - 1)) == 0);
+ size = RoundUpTo(size, kStackAlign);
SFS_CHECK((guard & (pageSize - 1)) == 0);
void *addr = unsafe_stack_alloc(size, guard);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57866.185869.patch
Type: text/x-patch
Size: 448 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190207/9af3de79/attachment.bin>
More information about the llvm-commits
mailing list