diff options
Diffstat (limited to 'runtime/entrypoints/entrypoint_utils.cc')
| -rw-r--r-- | runtime/entrypoints/entrypoint_utils.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/entrypoints/entrypoint_utils.cc b/runtime/entrypoints/entrypoint_utils.cc index 4755b9e9db..a0e35f88fa 100644 --- a/runtime/entrypoints/entrypoint_utils.cc +++ b/runtime/entrypoints/entrypoint_utils.cc @@ -212,6 +212,11 @@ void ThrowStackOverflowError(Thread* self) { bool explicit_overflow_check = Runtime::Current()->ExplicitStackOverflowChecks(); self->ResetDefaultStackEnd(!explicit_overflow_check); // Return to default stack size. + + // And restore protection if implicit checks are on. + if (!explicit_overflow_check) { + self->ProtectStack(); + } } void CheckReferenceResult(mirror::Object* o, Thread* self) { |