Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(903)

Side by Side Diff: breakpad/linux/exception_handler.h

Issue 119249: Linux: Dumping a renderer can traverse an invalid pointer. (Closed)
Patch Set: Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | breakpad/linux/exception_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009, Google Inc. 1 // Copyright (c) 2009, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 static bool WriteMinidump(const std::string &dump_path, 139 static bool WriteMinidump(const std::string &dump_path,
140 MinidumpCallback callback, 140 MinidumpCallback callback,
141 void *callback_context); 141 void *callback_context);
142 142
143 // This structure is passed to minidump_writer.h:WriteMinidump via an opaque 143 // This structure is passed to minidump_writer.h:WriteMinidump via an opaque
144 // blob. It shouldn't be needed in any user code. 144 // blob. It shouldn't be needed in any user code.
145 struct CrashContext { 145 struct CrashContext {
146 siginfo_t siginfo; 146 siginfo_t siginfo;
147 pid_t tid; // the crashing thread. 147 pid_t tid; // the crashing thread.
148 struct ucontext context; 148 struct ucontext context;
149 struct _libc_fpstate float_state;
149 }; 150 };
150 151
151 private: 152 private:
152 bool InstallHandlers(); 153 bool InstallHandlers();
153 void UninstallHandlers(); 154 void UninstallHandlers();
154 void PreresolveSymbols(); 155 void PreresolveSymbols();
155 156
156 void UpdateNextID(); 157 void UpdateNextID();
157 static void SignalHandler(int sig, siginfo_t* info, void* uc); 158 static void SignalHandler(int sig, siginfo_t* info, void* uc);
158 bool HandleSignal(int sig, siginfo_t* info, void* uc); 159 bool HandleSignal(int sig, siginfo_t* info, void* uc);
(...skipping 29 matching lines...) Expand all
188 static pthread_mutex_t handler_stack_mutex_; 189 static pthread_mutex_t handler_stack_mutex_;
189 190
190 // A vector of the old signal handlers. The void* is a pointer to a newly 191 // A vector of the old signal handlers. The void* is a pointer to a newly
191 // allocated sigaction structure to avoid pulling in too many includes. 192 // allocated sigaction structure to avoid pulling in too many includes.
192 std::vector<std::pair<int, void *> > old_handlers_; 193 std::vector<std::pair<int, void *> > old_handlers_;
193 }; 194 };
194 195
195 } // namespace google_breakpad 196 } // namespace google_breakpad
196 197
197 #endif // CLIENT_LINUX_HANDLER_EXCEPTION_HANDLER_H_ 198 #endif // CLIENT_LINUX_HANDLER_EXCEPTION_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | breakpad/linux/exception_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698