bornintelligent / google-breakpad

Automatically exported from code.google.com/p/google-breakpad
0 stars 0 forks source link

Assertion in CrashReportSender when no checkpoint file is desired #216

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
To reproduce:

Instantiate a CrashReportSender with L"" as the constructor argument like so:

  google_breakpad::CrashReportSender sender(L"");

That should be fine but the CrashReportSender class tries to open the file
without checking the path. It asserts in the debug runtime here:

  _ASSERTE(*file != _T('\0'));

The code fails gracefully and so the assertion is really nothing more than
an annoyance. I'm running Windows XP.

Original issue reported on code.google.com by bent.moz...@gmail.com on 19 Sep 2007 at 8:11

GoogleCodeExporter commented 9 years ago
For some reason I keep getting server errors trying to submit a patch for this. 
I'll
keep trying, but the simple change is this:

Index: src/client/windows/sender/crash_report_sender.cc

 int CrashReportSender::OpenCheckpointFile(const wchar_t *mode, FILE **fd) {
+  if (checkpoint_file_.empty()) {
+    return ENOENT;
+  }
 #if _MSC_VER >= 1400  // MSVC 2005/8

Original comment by bent.moz...@gmail.com on 19 Sep 2007 at 8:13

GoogleCodeExporter commented 9 years ago
r=me and checked in at svn trunk [219].  Ben, thanks for the report and patch!

Original comment by mmento...@gmail.com on 28 Sep 2007 at 6:26

GoogleCodeExporter commented 9 years ago

Original comment by mmento...@gmail.com on 28 Sep 2007 at 6:26