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

Unified Diff: chrome/browser/crash_handler_host_linux.cc

Issue 12091004: POSIX: re-enable strict aliasing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/breakpad_linux.cc ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/crash_handler_host_linux.cc
diff --git a/chrome/browser/crash_handler_host_linux.cc b/chrome/browser/crash_handler_host_linux.cc
index 27ad89bd072fc85c9cd090a5fa7102bb4edcc173..517c3d45c98ee3df3d5e197cc75822b703d82170 100644
--- a/chrome/browser/crash_handler_host_linux.cc
+++ b/chrome/browser/crash_handler_host_linux.cc
@@ -235,8 +235,10 @@ void CrashHandlerHostLinux::OnFileCanReadWithoutBlocking(int fd) {
(void) HANDLE_EINTR(close(reinterpret_cast<int*>(CMSG_DATA(hdr))[i]));
return;
} else {
- partner_fd = reinterpret_cast<int*>(CMSG_DATA(hdr))[0];
- signal_fd = reinterpret_cast<int*>(CMSG_DATA(hdr))[1];
+ int fds[2] = { -1, -1 };
Mark Mentovai 2013/08/15 14:29:07 Don’t initialize, the memcpy follows immediately.
Paweł Hajdan Jr. 2013/08/19 20:09:37 Done.
+ memcpy(fds, CMSG_DATA(hdr), sizeof(fds));
+ partner_fd = fds[0];
+ signal_fd = fds[1];
}
} else if (hdr->cmsg_type == SCM_CREDENTIALS) {
const struct ucred *cred =
« no previous file with comments | « chrome/app/breakpad_linux.cc ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698