Index: handler/win/crashy_test_program.cc |
diff --git a/handler/win/crashy_test_program.cc b/handler/win/crashy_test_program.cc |
index 07c9cf101278213f36b55e3025b8b1c88ece15a4..d9af2fba3b9a56004d63f70054244fc87722c32f 100644 |
--- a/handler/win/crashy_test_program.cc |
+++ b/handler/win/crashy_test_program.cc |
@@ -12,9 +12,10 @@ |
// See the License for the specific language governing permissions and |
// limitations under the License. |
-#include "client/crashpad_client.h" |
+#include <windows.h> |
#include "base/logging.h" |
+#include "client/crashpad_client.h" |
#include "tools/tool_support.h" |
namespace crashpad { |
@@ -22,6 +23,14 @@ namespace { |
void SomeCrashyFunction() { |
volatile int* foo = reinterpret_cast<volatile int*>(7); |
Mark Mentovai
2015/09/29 22:14:04
Move after CreateFile().
scottmg
2015/09/30 18:54:11
Done.
|
+ // Cause a GetLastError setting too before we crash. |
+ CreateFile(L"non-existent file", |
Mark Mentovai
2015/09/29 22:14:04
Since we don’t control the current directory or it
scottmg
2015/09/30 18:54:11
SetLastError() seems much better. Done.
|
+ GENERIC_READ, |
+ 0, |
+ nullptr, |
+ OPEN_EXISTING, |
+ 0, |
+ nullptr); |
*foo = 42; |
} |