blob: bc6acec71388c45dd3bcd88243ecf2ec86d8074d [file] [log] [blame]
Dave Allisonb373e092014-02-20 16:06:36 -08001/*
2 * Copyright (C) 2008 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include "fault_handler.h"
Ian Rogers22d5e732014-07-15 22:23:51 -070018
Alex Light21f498f2018-02-02 11:12:49 -080019#include <string.h>
Dave Allisonb373e092014-02-20 16:06:36 -080020#include <sys/mman.h>
21#include <sys/ucontext.h>
Mathieu Chartiere401d142015-04-22 13:56:20 -070022
23#include "art_method-inl.h"
Andreas Gampe170331f2017-12-07 18:41:03 -080024#include "base/logging.h" // For VLOG
Josh Gao143f61c2017-04-17 20:10:29 -070025#include "base/safe_copy.h"
Andreas Gampe928f72b2014-09-09 19:53:48 -070026#include "base/stl_util.h"
David Sehr9e734c72018-01-04 17:56:19 -080027#include "dex/dex_file_types.h"
Ian Rogers22d5e732014-07-15 22:23:51 -070028#include "mirror/class.h"
Josh Gao143f61c2017-04-17 20:10:29 -070029#include "mirror/object_reference.h"
Nicolas Geoffray524e7ea2015-10-16 17:13:34 +010030#include "oat_quick_method_header.h"
Dave Allisonf4b80bc2014-05-14 15:41:25 -070031#include "sigchain.h"
Andreas Gampeb486a982017-06-01 13:45:54 -070032#include "thread-current-inl.h"
Dave Allisonb373e092014-02-20 16:06:36 -080033#include "verify_object-inl.h"
34
35namespace art {
36// Static fault manger object accessed by signal handler.
37FaultManager fault_manager;
38
Alex Light9cc68ed2018-04-03 15:55:46 -070039// This needs to be NO_INLINE since some debuggers do not read the inline-info to set a breakpoint
40// if it isn't.
41extern "C" NO_INLINE __attribute__((visibility("default"))) void art_sigsegv_fault() {
Dave Allisonf4b80bc2014-05-14 15:41:25 -070042 // Set a breakpoint here to be informed when a SIGSEGV is unhandled by ART.
43 VLOG(signals)<< "Caught unknown SIGSEGV in ART fault handler - chaining to next handler.";
44}
Dave Allisonf4b80bc2014-05-14 15:41:25 -070045
Dave Allisonb373e092014-02-20 16:06:36 -080046// Signal handler called on SIGSEGV.
Josh Gao85a78cf2017-03-20 16:26:42 -070047static bool art_fault_handler(int sig, siginfo_t* info, void* context) {
48 return fault_manager.HandleFault(sig, info, context);
Dave Allisonb373e092014-02-20 16:06:36 -080049}
50
Josh Gao143f61c2017-04-17 20:10:29 -070051#if defined(__linux__)
52
53// Change to verify the safe implementations against the original ones.
54constexpr bool kVerifySafeImpls = false;
55
56// Provide implementations of ArtMethod::GetDeclaringClass and VerifyClassClass that use SafeCopy
57// to safely dereference pointers which are potentially garbage.
58// Only available on Linux due to availability of SafeCopy.
59
60static mirror::Class* SafeGetDeclaringClass(ArtMethod* method)
61 REQUIRES_SHARED(Locks::mutator_lock_) {
62 char* method_declaring_class =
63 reinterpret_cast<char*>(method) + ArtMethod::DeclaringClassOffset().SizeValue();
64
65 // ArtMethod::declaring_class_ is a GcRoot<mirror::Class>.
66 // Read it out into as a CompressedReference directly for simplicity's sake.
67 mirror::CompressedReference<mirror::Class> cls;
68 ssize_t rc = SafeCopy(&cls, method_declaring_class, sizeof(cls));
69 CHECK_NE(-1, rc);
70
71 if (kVerifySafeImpls) {
Vladimir Markod93e3742018-07-18 10:58:13 +010072 ObjPtr<mirror::Class> actual_class = method->GetDeclaringClassUnchecked<kWithoutReadBarrier>();
Josh Gao143f61c2017-04-17 20:10:29 -070073 CHECK_EQ(actual_class, cls.AsMirrorPtr());
74 }
75
76 if (rc != sizeof(cls)) {
77 return nullptr;
78 }
79
80 return cls.AsMirrorPtr();
81}
82
83static mirror::Class* SafeGetClass(mirror::Object* obj) REQUIRES_SHARED(Locks::mutator_lock_) {
84 char* obj_cls = reinterpret_cast<char*>(obj) + mirror::Object::ClassOffset().SizeValue();
85
Mathieu Chartierad8ebb32017-08-09 20:13:18 -070086 mirror::HeapReference<mirror::Class> cls;
Josh Gao143f61c2017-04-17 20:10:29 -070087 ssize_t rc = SafeCopy(&cls, obj_cls, sizeof(cls));
88 CHECK_NE(-1, rc);
89
90 if (kVerifySafeImpls) {
91 mirror::Class* actual_class = obj->GetClass<kVerifyNone>();
92 CHECK_EQ(actual_class, cls.AsMirrorPtr());
93 }
94
95 if (rc != sizeof(cls)) {
96 return nullptr;
97 }
98
99 return cls.AsMirrorPtr();
100}
101
102static bool SafeVerifyClassClass(mirror::Class* cls) REQUIRES_SHARED(Locks::mutator_lock_) {
103 mirror::Class* c_c = SafeGetClass(cls);
104 bool result = c_c != nullptr && c_c == SafeGetClass(c_c);
105
106 if (kVerifySafeImpls) {
107 CHECK_EQ(VerifyClassClass(cls), result);
108 }
109
110 return result;
111}
112
113#else
114
Josh Gao77c14152017-04-19 13:20:19 -0700115static mirror::Class* SafeGetDeclaringClass(ArtMethod* method_obj)
116 REQUIRES_SHARED(Locks::mutator_lock_) {
Mathieu Chartier9a497a62018-07-22 13:56:00 -0700117 return method_obj->GetDeclaringClassUnchecked<kWithoutReadBarrier>().Ptr();
Josh Gao143f61c2017-04-17 20:10:29 -0700118}
119
Josh Gao77c14152017-04-19 13:20:19 -0700120static bool SafeVerifyClassClass(mirror::Class* cls) REQUIRES_SHARED(Locks::mutator_lock_) {
Josh Gao143f61c2017-04-17 20:10:29 -0700121 return VerifyClassClass(cls);
122}
123#endif
124
125
Dave Allison1f8ef6f2014-08-20 17:38:41 -0700126FaultManager::FaultManager() : initialized_(false) {
Dave Allisonb373e092014-02-20 16:06:36 -0800127 sigaction(SIGSEGV, nullptr, &oldaction_);
128}
129
130FaultManager::~FaultManager() {
Dave Allisonb373e092014-02-20 16:06:36 -0800131}
132
133void FaultManager::Init() {
Dave Allison1f8ef6f2014-08-20 17:38:41 -0700134 CHECK(!initialized_);
Josh Gao6b2018f2017-05-04 13:55:28 -0700135 sigset_t mask;
136 sigfillset(&mask);
137 sigdelset(&mask, SIGABRT);
138 sigdelset(&mask, SIGBUS);
139 sigdelset(&mask, SIGFPE);
140 sigdelset(&mask, SIGILL);
141 sigdelset(&mask, SIGSEGV);
142
143 SigchainAction sa = {
144 .sc_sigaction = art_fault_handler,
145 .sc_mask = mask,
146 .sc_flags = 0UL,
147 };
148
149 AddSpecialSignalHandlerFn(SIGSEGV, &sa);
Dave Allison1f8ef6f2014-08-20 17:38:41 -0700150 initialized_ = true;
151}
152
Andreas Gampe928f72b2014-09-09 19:53:48 -0700153void FaultManager::Release() {
Dave Allison1f8ef6f2014-08-20 17:38:41 -0700154 if (initialized_) {
Josh Gao85a78cf2017-03-20 16:26:42 -0700155 RemoveSpecialSignalHandlerFn(SIGSEGV, art_fault_handler);
Dave Allison1f8ef6f2014-08-20 17:38:41 -0700156 initialized_ = false;
157 }
Dave Allisonb373e092014-02-20 16:06:36 -0800158}
159
Andreas Gampe928f72b2014-09-09 19:53:48 -0700160void FaultManager::Shutdown() {
161 if (initialized_) {
162 Release();
163
164 // Free all handlers.
165 STLDeleteElements(&generated_code_handlers_);
166 STLDeleteElements(&other_handlers_);
167 }
168}
169
jgu211376bdf2016-01-18 09:12:33 -0500170bool FaultManager::HandleFaultByOtherHandlers(int sig, siginfo_t* info, void* context) {
Andreas Gamped14b73d2016-04-18 17:15:42 -0700171 if (other_handlers_.empty()) {
172 return false;
173 }
174
Dave Allison0c2894b2014-08-29 12:06:16 -0700175 Thread* self = Thread::Current();
176
jgu211376bdf2016-01-18 09:12:33 -0500177 DCHECK(self != nullptr);
178 DCHECK(Runtime::Current() != nullptr);
179 DCHECK(Runtime::Current()->IsStarted());
Josh Gaoefd20cb2017-02-28 16:53:59 -0800180 for (const auto& handler : other_handlers_) {
181 if (handler->Action(sig, info, context)) {
182 return true;
Ian Rogersad11e7a2014-11-11 16:55:11 -0800183 }
184 }
jgu211376bdf2016-01-18 09:12:33 -0500185 return false;
186}
187
Alex Light21f498f2018-02-02 11:12:49 -0800188static const char* SignalCodeName(int sig, int code) {
189 if (sig != SIGSEGV) {
190 return "UNKNOWN";
191 } else {
192 switch (code) {
193 case SEGV_MAPERR: return "SEGV_MAPERR";
194 case SEGV_ACCERR: return "SEGV_ACCERR";
Evgenii Stepanovfcef77b2021-10-13 11:17:36 -0700195 case 8: return "SEGV_MTEAERR";
196 case 9: return "SEGV_MTESERR";
Alex Light21f498f2018-02-02 11:12:49 -0800197 default: return "UNKNOWN";
198 }
199 }
200}
201static std::ostream& PrintSignalInfo(std::ostream& os, siginfo_t* info) {
202 os << " si_signo: " << info->si_signo << " (" << strsignal(info->si_signo) << ")\n"
203 << " si_code: " << info->si_code
204 << " (" << SignalCodeName(info->si_signo, info->si_code) << ")";
205 if (info->si_signo == SIGSEGV) {
206 os << "\n" << " si_addr: " << info->si_addr;
207 }
208 return os;
209}
210
Josh Gao85a78cf2017-03-20 16:26:42 -0700211bool FaultManager::HandleFault(int sig, siginfo_t* info, void* context) {
Alex Light21f498f2018-02-02 11:12:49 -0800212 if (VLOG_IS_ON(signals)) {
213 PrintSignalInfo(VLOG_STREAM(signals) << "Handling fault:" << "\n", info);
214 }
Josh Gaoefd20cb2017-02-28 16:53:59 -0800215
216#ifdef TEST_NESTED_SIGNAL
Josh Gao85a78cf2017-03-20 16:26:42 -0700217 // Simulate a crash in a handler.
218 raise(SIGSEGV);
Josh Gaoefd20cb2017-02-28 16:53:59 -0800219#endif
220
Josh Gao85a78cf2017-03-20 16:26:42 -0700221 if (IsInGeneratedCode(info, context, true)) {
222 VLOG(signals) << "in generated code, looking for handler";
223 for (const auto& handler : generated_code_handlers_) {
224 VLOG(signals) << "invoking Action on handler " << handler;
225 if (handler->Action(sig, info, context)) {
226 // We have handled a signal so it's time to return from the
227 // signal handler to the appropriate place.
228 return true;
Josh Gaoefd20cb2017-02-28 16:53:59 -0800229 }
Josh Gao85a78cf2017-03-20 16:26:42 -0700230 }
Alex Lightf4ed7e82018-01-17 11:52:36 -0800231 }
Josh Gaoefd20cb2017-02-28 16:53:59 -0800232
Alex Lightf4ed7e82018-01-17 11:52:36 -0800233 // We hit a signal we didn't handle. This might be something for which
234 // we can give more information about so call all registered handlers to
235 // see if it is.
236 if (HandleFaultByOtherHandlers(sig, info, context)) {
237 return true;
jgu211376bdf2016-01-18 09:12:33 -0500238 }
Dave Allisonf4b80bc2014-05-14 15:41:25 -0700239
Dave Allison8be44cf2014-09-04 14:33:42 -0700240 // Set a breakpoint in this function to catch unhandled signals.
241 art_sigsegv_fault();
Josh Gao85a78cf2017-03-20 16:26:42 -0700242 return false;
Dave Allisonb373e092014-02-20 16:06:36 -0800243}
244
Mathieu Chartierc751fdc2014-03-30 15:25:44 -0700245void FaultManager::AddHandler(FaultHandler* handler, bool generated_code) {
Andreas Gampe928f72b2014-09-09 19:53:48 -0700246 DCHECK(initialized_);
Mathieu Chartierc751fdc2014-03-30 15:25:44 -0700247 if (generated_code) {
248 generated_code_handlers_.push_back(handler);
249 } else {
250 other_handlers_.push_back(handler);
251 }
252}
253
254void FaultManager::RemoveHandler(FaultHandler* handler) {
255 auto it = std::find(generated_code_handlers_.begin(), generated_code_handlers_.end(), handler);
256 if (it != generated_code_handlers_.end()) {
257 generated_code_handlers_.erase(it);
258 return;
259 }
260 auto it2 = std::find(other_handlers_.begin(), other_handlers_.end(), handler);
261 if (it2 != other_handlers_.end()) {
Alex Lightf4ed7e82018-01-17 11:52:36 -0800262 other_handlers_.erase(it2);
Mathieu Chartierc751fdc2014-03-30 15:25:44 -0700263 return;
264 }
265 LOG(FATAL) << "Attempted to remove non existent handler " << handler;
266}
Dave Allisonb373e092014-02-20 16:06:36 -0800267
268// This function is called within the signal handler. It checks that
269// the mutator_lock is held (shared). No annotalysis is done.
Dave Allison69dfe512014-07-11 17:11:58 +0000270bool FaultManager::IsInGeneratedCode(siginfo_t* siginfo, void* context, bool check_dex_pc) {
Dave Allisonb373e092014-02-20 16:06:36 -0800271 // We can only be running Java code in the current thread if it
272 // is in Runnable state.
Dave Allison5cd33752014-04-15 15:57:58 -0700273 VLOG(signals) << "Checking for generated code";
Dave Allisonb373e092014-02-20 16:06:36 -0800274 Thread* thread = Thread::Current();
275 if (thread == nullptr) {
Dave Allison5cd33752014-04-15 15:57:58 -0700276 VLOG(signals) << "no current thread";
Dave Allisonb373e092014-02-20 16:06:36 -0800277 return false;
278 }
279
280 ThreadState state = thread->GetState();
281 if (state != kRunnable) {
Dave Allison5cd33752014-04-15 15:57:58 -0700282 VLOG(signals) << "not runnable";
Dave Allisonb373e092014-02-20 16:06:36 -0800283 return false;
284 }
285
286 // Current thread is runnable.
287 // Make sure it has the mutator lock.
288 if (!Locks::mutator_lock_->IsSharedHeld(thread)) {
Dave Allison5cd33752014-04-15 15:57:58 -0700289 VLOG(signals) << "no lock";
Dave Allisonb373e092014-02-20 16:06:36 -0800290 return false;
291 }
292
Nicolas Geoffray7bf2b4f2015-07-08 10:11:59 +0000293 ArtMethod* method_obj = nullptr;
Dave Allisonb373e092014-02-20 16:06:36 -0800294 uintptr_t return_pc = 0;
Mathieu Chartierc751fdc2014-03-30 15:25:44 -0700295 uintptr_t sp = 0;
Nicolas Geoffraya00b54b2019-12-03 14:36:42 +0000296 bool is_stack_overflow = false;
Dave Allisonb373e092014-02-20 16:06:36 -0800297
298 // Get the architecture specific method address and return address. These
Mathieu Chartierc751fdc2014-03-30 15:25:44 -0700299 // are in architecture specific files in arch/<arch>/fault_handler_<arch>.
Nicolas Geoffraya00b54b2019-12-03 14:36:42 +0000300 GetMethodAndReturnPcAndSp(siginfo, context, &method_obj, &return_pc, &sp, &is_stack_overflow);
Dave Allisonb373e092014-02-20 16:06:36 -0800301
302 // If we don't have a potential method, we're outta here.
Dave Allison5cd33752014-04-15 15:57:58 -0700303 VLOG(signals) << "potential method: " << method_obj;
Mathieu Chartiere401d142015-04-22 13:56:20 -0700304 // TODO: Check linear alloc and image.
Andreas Gampe542451c2016-07-26 09:02:02 -0700305 DCHECK_ALIGNED(ArtMethod::Size(kRuntimePointerSize), sizeof(void*))
Nicolas Geoffray7bf2b4f2015-07-08 10:11:59 +0000306 << "ArtMethod is not pointer aligned";
307 if (method_obj == nullptr || !IsAligned<sizeof(void*)>(method_obj)) {
Dave Allison5cd33752014-04-15 15:57:58 -0700308 VLOG(signals) << "no method";
Dave Allisonb373e092014-02-20 16:06:36 -0800309 return false;
310 }
311
312 // Verify that the potential method is indeed a method.
313 // TODO: check the GC maps to make sure it's an object.
Dave Allisonb373e092014-02-20 16:06:36 -0800314 // Check that the class pointer inside the object is not null and is aligned.
Hiroshi Yamauchi2cd334a2015-01-09 14:03:35 -0800315 // No read barrier because method_obj may not be a real object.
Josh Gao143f61c2017-04-17 20:10:29 -0700316 mirror::Class* cls = SafeGetDeclaringClass(method_obj);
Dave Allisonb373e092014-02-20 16:06:36 -0800317 if (cls == nullptr) {
Dave Allison5cd33752014-04-15 15:57:58 -0700318 VLOG(signals) << "not a class";
Dave Allisonb373e092014-02-20 16:06:36 -0800319 return false;
320 }
Josh Gao143f61c2017-04-17 20:10:29 -0700321
Dave Allisonb373e092014-02-20 16:06:36 -0800322 if (!IsAligned<kObjectAlignment>(cls)) {
Dave Allison5cd33752014-04-15 15:57:58 -0700323 VLOG(signals) << "not aligned";
Dave Allisonb373e092014-02-20 16:06:36 -0800324 return false;
325 }
326
Josh Gao143f61c2017-04-17 20:10:29 -0700327 if (!SafeVerifyClassClass(cls)) {
Dave Allison5cd33752014-04-15 15:57:58 -0700328 VLOG(signals) << "not a class class";
Dave Allisonb373e092014-02-20 16:06:36 -0800329 return false;
330 }
331
Nicolas Geoffray524e7ea2015-10-16 17:13:34 +0100332 const OatQuickMethodHeader* method_header = method_obj->GetOatQuickMethodHeader(return_pc);
Nicolas Geoffray6bc43742015-10-12 18:11:10 +0100333
Nicolas Geoffray3eb493f2020-11-27 12:31:06 +0000334 if (method_header == nullptr) {
335 VLOG(signals) << "no compiled code";
336 return false;
337 }
338
Dave Allisonb373e092014-02-20 16:06:36 -0800339 // We can be certain that this is a method now. Check if we have a GC map
340 // at the return PC address.
Dave Allisonf9439142014-03-27 15:10:22 -0700341 if (true || kIsDebugBuild) {
Dave Allison5cd33752014-04-15 15:57:58 -0700342 VLOG(signals) << "looking for dex pc for return pc " << std::hex << return_pc;
Nicolas Geoffray6bc43742015-10-12 18:11:10 +0100343 uint32_t sought_offset = return_pc -
Nicolas Geoffray524e7ea2015-10-16 17:13:34 +0100344 reinterpret_cast<uintptr_t>(method_header->GetEntryPoint());
Dave Allison5cd33752014-04-15 15:57:58 -0700345 VLOG(signals) << "pc offset: " << std::hex << sought_offset;
Dave Allisonf9439142014-03-27 15:10:22 -0700346 }
Nicolas Geoffraya00b54b2019-12-03 14:36:42 +0000347 uint32_t dexpc = dex::kDexNoIndex;
348 if (is_stack_overflow) {
349 // If it's an implicit stack overflow check, the frame is not setup, so we
350 // just infer the dex PC as zero.
351 dexpc = 0;
352 } else {
353 CHECK_EQ(*reinterpret_cast<ArtMethod**>(sp), method_obj);
354 dexpc = method_header->ToDexPc(reinterpret_cast<ArtMethod**>(sp), return_pc, false);
355 }
Dave Allison5cd33752014-04-15 15:57:58 -0700356 VLOG(signals) << "dexpc: " << dexpc;
Andreas Gampee2abbc62017-09-15 11:59:26 -0700357 return !check_dex_pc || dexpc != dex::kDexNoIndex;
Mathieu Chartierc751fdc2014-03-30 15:25:44 -0700358}
359
360FaultHandler::FaultHandler(FaultManager* manager) : manager_(manager) {
Dave Allisonb373e092014-02-20 16:06:36 -0800361}
362
363//
364// Null pointer fault handler
365//
Mathieu Chartierc751fdc2014-03-30 15:25:44 -0700366NullPointerHandler::NullPointerHandler(FaultManager* manager) : FaultHandler(manager) {
367 manager_->AddHandler(this, true);
Dave Allisonb373e092014-02-20 16:06:36 -0800368}
369
370//
371// Suspension fault handler
372//
Mathieu Chartierc751fdc2014-03-30 15:25:44 -0700373SuspensionHandler::SuspensionHandler(FaultManager* manager) : FaultHandler(manager) {
374 manager_->AddHandler(this, true);
Dave Allisonb373e092014-02-20 16:06:36 -0800375}
376
377//
378// Stack overflow fault handler
379//
Mathieu Chartierc751fdc2014-03-30 15:25:44 -0700380StackOverflowHandler::StackOverflowHandler(FaultManager* manager) : FaultHandler(manager) {
381 manager_->AddHandler(this, true);
Dave Allisonb373e092014-02-20 16:06:36 -0800382}
Mathieu Chartierc751fdc2014-03-30 15:25:44 -0700383
384//
385// Stack trace handler, used to help get a stack trace from SIGSEGV inside of compiled code.
386//
387JavaStackTraceHandler::JavaStackTraceHandler(FaultManager* manager) : FaultHandler(manager) {
388 manager_->AddHandler(this, false);
389}
390
Roland Levillain4b8f1ec2015-08-26 18:34:03 +0100391bool JavaStackTraceHandler::Action(int sig ATTRIBUTE_UNUSED, siginfo_t* siginfo, void* context) {
Mathieu Chartierc751fdc2014-03-30 15:25:44 -0700392 // Make sure that we are in the generated code, but we may not have a dex pc.
Dave Allison8ce6b902014-08-26 11:07:58 -0700393 bool in_generated_code = manager_->IsInGeneratedCode(siginfo, context, false);
Dave Allison8ce6b902014-08-26 11:07:58 -0700394 if (in_generated_code) {
Mathieu Chartierc751fdc2014-03-30 15:25:44 -0700395 LOG(ERROR) << "Dumping java stack trace for crash in generated code";
Mathieu Chartiere401d142015-04-22 13:56:20 -0700396 ArtMethod* method = nullptr;
Mathieu Chartierc751fdc2014-03-30 15:25:44 -0700397 uintptr_t return_pc = 0;
398 uintptr_t sp = 0;
Nicolas Geoffraya00b54b2019-12-03 14:36:42 +0000399 bool is_stack_overflow = false;
Mathieu Chartierc751fdc2014-03-30 15:25:44 -0700400 Thread* self = Thread::Current();
Dave Allison8ce6b902014-08-26 11:07:58 -0700401
Nicolas Geoffraya00b54b2019-12-03 14:36:42 +0000402 manager_->GetMethodAndReturnPcAndSp(
403 siginfo, context, &method, &return_pc, &sp, &is_stack_overflow);
Dave Allison0c2894b2014-08-29 12:06:16 -0700404 // Inside of generated code, sp[0] is the method, so sp is the frame.
Mathieu Chartiere401d142015-04-22 13:56:20 -0700405 self->SetTopOfStack(reinterpret_cast<ArtMethod**>(sp));
Andreas Gampe3fec9ac2016-09-13 10:47:28 -0700406 self->DumpJavaStack(LOG_STREAM(ERROR));
Mathieu Chartierc751fdc2014-03-30 15:25:44 -0700407 }
Dave Allison8ce6b902014-08-26 11:07:58 -0700408
Mathieu Chartierc751fdc2014-03-30 15:25:44 -0700409 return false; // Return false since we want to propagate the fault to the main signal handler.
410}
411
Dave Allisonb373e092014-02-20 16:06:36 -0800412} // namespace art