mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Backout changeset 34235900c3a0 (bug 1036286) because it wasn't the right fix.
This commit is contained in:
parent
15a2b548d5
commit
8c39460da9
@ -353,11 +353,6 @@ CustomElf::GetSymbolPtrInDeps(const char *symbol) const
|
||||
if (strcmp(symbol + 2, "gnu_Unwind_Find_exidx") == 0)
|
||||
return FunctionPtr(__wrap___gnu_Unwind_Find_exidx);
|
||||
#endif
|
||||
} else if (symbol[0] == 's' && symbol[1] == 'i') {
|
||||
if (strcmp(symbol + 2, "gnal") == 0)
|
||||
return FunctionPtr(SEGVHandler::__wrap_signal);
|
||||
if (strcmp(symbol + 2, "gaction") == 0)
|
||||
return FunctionPtr(SEGVHandler::__wrap_sigaction);
|
||||
}
|
||||
|
||||
#define MISSING_FLASH_SYMNAME_START "_ZN7android10VectorImpl19reservedVectorImpl"
|
||||
|
@ -1123,30 +1123,4 @@ SEGVHandler::__wrap_sigaction(int signum, const struct sigaction *act,
|
||||
return 0;
|
||||
}
|
||||
|
||||
sighandler_t
|
||||
SEGVHandler::__wrap_signal(int signum, sighandler_t handler)
|
||||
{
|
||||
/* Use system signal() function for all but SIGSEGV signals. */
|
||||
if (signum != SIGSEGV)
|
||||
return signal(signum, handler);
|
||||
|
||||
SEGVHandler &that = ElfLoader::Singleton;
|
||||
union {
|
||||
sighandler_t signal;
|
||||
void (*sigaction)(int, siginfo_t *, void *);
|
||||
} oldHandler;
|
||||
|
||||
/* Keep the previous handler to return its value */
|
||||
if (that.action.sa_flags & SA_SIGINFO) {
|
||||
oldHandler.sigaction = that.action.sa_sigaction;
|
||||
} else {
|
||||
oldHandler.signal = that.action.sa_handler;
|
||||
}
|
||||
/* Set the new handler */
|
||||
that.action.sa_handler = handler;
|
||||
that.action.sa_flags = 0;
|
||||
|
||||
return oldHandler.signal;
|
||||
}
|
||||
|
||||
Logging Logging::Singleton;
|
||||
|
@ -319,16 +319,14 @@ public:
|
||||
return signalHandlingBroken;
|
||||
}
|
||||
|
||||
static int __wrap_sigaction(int signum, const struct sigaction *act,
|
||||
struct sigaction *oldact);
|
||||
|
||||
static sighandler_t __wrap_signal(int signum, sighandler_t handler);
|
||||
|
||||
protected:
|
||||
SEGVHandler();
|
||||
~SEGVHandler();
|
||||
|
||||
private:
|
||||
static int __wrap_sigaction(int signum, const struct sigaction *act,
|
||||
struct sigaction *oldact);
|
||||
|
||||
/**
|
||||
* SIGSEGV handler registered with __wrap_signal or __wrap_sigaction.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user