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

Side by Side Diff: third_party/crashpad/crashpad/handler/win/crashy_test_program.cc

Issue 1921833002: Update Crashpad to 00d458adaf3868999eeab5341fce5bedb81d17a1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win fixes Created 4 years, 8 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
OLDNEW
1 // Copyright 2015 The Crashpad Authors. All rights reserved. 1 // Copyright 2015 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 // Make sure data pointed to by the stack is captured. 216 // Make sure data pointed to by the stack is captured.
217 const int kDataSize = 512; 217 const int kDataSize = 512;
218 int* pointed_to_data = new int[kDataSize]; 218 int* pointed_to_data = new int[kDataSize];
219 for (int i = 0; i < kDataSize; ++i) 219 for (int i = 0; i < kDataSize; ++i)
220 pointed_to_data[i] = i | ((i % 2 == 0) ? 0x80000000 : 0); 220 pointed_to_data[i] = i | ((i % 2 == 0) ? 0x80000000 : 0);
221 int* offset_pointer = &pointed_to_data[128]; 221 int* offset_pointer = &pointed_to_data[128];
222 // Encourage the compiler to keep this variable around. 222 // Encourage the compiler to keep this variable around.
223 printf("%p, %p\n", offset_pointer, &offset_pointer); 223 printf("%p, %p\n", offset_pointer, &offset_pointer);
224 224
225 crashpad::CrashpadInfo::GetCrashpadInfo() 225 crashpad::CrashpadInfo::GetCrashpadInfo()
226 ->set_gather_indirectly_referenced_memory(TriState::kEnabled); 226 ->set_gather_indirectly_referenced_memory(
227 TriState::kEnabled, std::numeric_limits<uint32_t>::max());
227 228
228 std::vector<uint8_t> data_stream1(128, 'x'); 229 std::vector<uint8_t> data_stream1(128, 'x');
229 crashpad::CrashpadInfo::GetCrashpadInfo()->AddUserDataMinidumpStream( 230 crashpad::CrashpadInfo::GetCrashpadInfo()->AddUserDataMinidumpStream(
230 222222, 231 222222,
231 reinterpret_cast<const void*>(data_stream1.data()), 232 reinterpret_cast<const void*>(data_stream1.data()),
232 data_stream1.size()); 233 data_stream1.size());
233 234
234 std::vector<uint8_t> data_stream2(4096, 'z'); 235 std::vector<uint8_t> data_stream2(4096, 'z');
235 crashpad::CrashpadInfo::GetCrashpadInfo()->AddUserDataMinidumpStream( 236 crashpad::CrashpadInfo::GetCrashpadInfo()->AddUserDataMinidumpStream(
236 333333, 237 333333,
(...skipping 14 matching lines...) Expand all
251 252
252 return EXIT_SUCCESS; 253 return EXIT_SUCCESS;
253 } 254 }
254 255
255 } // namespace 256 } // namespace
256 } // namespace crashpad 257 } // namespace crashpad
257 258
258 int wmain(int argc, wchar_t* argv[]) { 259 int wmain(int argc, wchar_t* argv[]) {
259 return crashpad::CrashyMain(argc, argv); 260 return crashpad::CrashyMain(argc, argv);
260 } 261 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698