Lines Matching defs:handler

31 // Typically a signal handler should not need to deal with signals that occur within it.
45 // thread running the signal handler.
46 // 3. set the handler for SIGSEGV and SIGABRT to a secondary signal handler.
54 // our secondary signal handler gets called in a signal context. This results in
70 // Static fault manger object accessed by signal handler.
76 VLOG(signals)<< "Caught unknown SIGSEGV in ART fault handler - chaining to next handler.";
80 // Signal handler called on SIGSEGV.
85 // Signal handler for dealing with a nested signal.
121 // Set our signal handler now.
126 // Make sure our signal handler is called before any user handlers.
142 // If the handler tries to call malloc, it will deadlock.
145 VLOG(signals) << "in generated code, looking for handler";
146 for (const auto& handler : generated_code_handlers_) {
147 VLOG(signals) << "invoking Action on handler " << handler;
148 if (handler->Action(sig, info, context)) {
150 // In test mode we want to fall through to stack trace handler
156 // signal handler to the appropriate place.
166 for (const auto& handler : other_handlers_) {
167 if (handler->Action(sig, info, context)) {
175 // Pass this on to the next handler in the chain, or the default if none.
179 void FaultManager::AddHandler(FaultHandler* handler, bool generated_code) {
181 generated_code_handlers_.push_back(handler);
183 other_handlers_.push_back(handler);
187 void FaultManager::RemoveHandler(FaultHandler* handler) {
188 auto it = std::find(generated_code_handlers_.begin(), generated_code_handlers_.end(), handler);
193 auto it2 = std::find(other_handlers_.begin(), other_handlers_.end(), handler);
198 LOG(FATAL) << "Attempted to remove non existent handler " << handler;
201 // This function is called within the signal handler. It checks that
284 // Null pointer fault handler
291 // Suspension fault handler
298 // Stack overflow fault handler
305 // Stack trace handler, used to help get a stack trace from SIGSEGV inside of compiled code.
330 // The action for SIGSEGV should be the default handler now.
332 // Unblock the signals we allow so that they can be delivered in the signal handler.
340 // handler.
344 // Explictly mask out SIGSEGV and SIGABRT from the nested signal handler. This
346 // nested signal handler.
356 // Catch SIGSEGV and SIGABRT to invoke our nested handler
360 LOG(ERROR) << "Unable to register nested signal handler - no stack trace possible";
367 // our nested signal handler will be invoked and this will longjmp to the saved
376 // To test the nested signal handler we raise a signal here. This will cause the
377 // nested signal handler to be called and perform a longjmp back to the setjmp
397 return false; // Return false since we want to propagate the fault to the main signal handler.