diff options
author | Dave Allison <dallison@google.com> | 2014-04-15 15:57:58 -0700 |
---|---|---|
committer | Dave Allison <dallison@google.com> | 2014-05-05 12:44:15 -0700 |
commit | 5cd33753b96d92c03e3cb10cb802e68fb6ef2f21 (patch) | |
tree | b2217cb48e1f1db1aae7a92f8d5dbac5f2d95603 /runtime/stack.h | |
parent | 8ea5baa10b04e9dbd0f0cf14b0358fe8b956bb2e (diff) | |
download | art-5cd33753b96d92c03e3cb10cb802e68fb6ef2f21.zip art-5cd33753b96d92c03e3cb10cb802e68fb6ef2f21.tar.gz art-5cd33753b96d92c03e3cb10cb802e68fb6ef2f21.tar.bz2 |
Handle implicit stack overflow without affecting stack walks
This changes the way in which implicit stack overflows are handled
to satisfy concerns about changes to the stack walk code.
Instead of creating a gap in the stack and checking for it in
the stack walker, use the ManagedStack infrastructure to concoct
an invisible gap that will never be seen by a stack walk.
Also, this uses madvise to tell the kernel that the main stack's
protected region will probably never be accessed, and instead
of using memset to map the pages in, use memcpy to read from
them. This will save 32K on the main stack.
Also adds a 'signals' verbosity level as per a review request.
Bug: 14066862
Change-Id: I5257305feeaea241d11e6aa6f021d2a81da20b81
Diffstat (limited to 'runtime/stack.h')
-rw-r--r-- | runtime/stack.h | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/runtime/stack.h b/runtime/stack.h index 73a823a..88ef78f 100644 --- a/runtime/stack.h +++ b/runtime/stack.h @@ -102,14 +102,6 @@ enum VRegBaseRegNum : int { kVRegNonSpecialTempBaseReg = -3, }; -// Special object used to mark the gap in the stack placed when a stack -// overflow fault occurs during implicit stack checking. This is not -// a real object - it is used simply as a valid address to which a -// mirror::ArtMethod* can be compared during a stack walk. It is inserted -// into the stack during the stack overflow signal handling to mark the gap -// in which the memory is protected against read and write. -extern void* stack_overflow_gap_marker; - // A reference from the shadow stack to a MirrorType object within the Java heap. template<class MirrorType> class MANAGED StackReference : public mirror::ObjectReference<false, MirrorType> { |