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

Side by Side Diff: breakpad/linux/generate-test-dump.cc

Issue 6271005: Fix clang warning / miscompile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 sys_write(2, dump_path, my_strlen(dump_path)); 50 sys_write(2, dump_path, my_strlen(dump_path));
51 sys_write(2, "/", 1); 51 sys_write(2, "/", 1);
52 sys_write(2, minidump_id, my_strlen(minidump_id)); 52 sys_write(2, minidump_id, my_strlen(minidump_id));
53 sys_write(2, ".dmp\n", 5); 53 sys_write(2, ".dmp\n", 5);
54 54
55 return true; 55 return true;
56 } 56 }
57 57
58 static void DoSomethingWhichCrashes() { 58 static void DoSomethingWhichCrashes() {
59 int local_var = 1; 59 int local_var = 1;
60 *reinterpret_cast<char*>(NULL) = 1; 60 *reinterpret_cast<volatile char*>(NULL) = 1;
61 } 61 }
62 62
63 int main() { 63 int main() {
64 google_breakpad::ExceptionHandler breakpad(".", NULL, DumpCallback, NULL, 64 google_breakpad::ExceptionHandler breakpad(".", NULL, DumpCallback, NULL,
65 true); 65 true);
66 DoSomethingWhichCrashes(); 66 DoSomethingWhichCrashes();
67 return 0; 67 return 0;
68 } 68 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698