sachinpc / google-breakpad

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

Mac and iOS Breakpad.h leak generically named #defines #487

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Both these files:
  client/mac/Framework/Breakpad.h
  client/ios/Breakpad.h
include
  client/apple/Framework/BreakpadDefines.h
which starts with these #defines:

#define kReporterMinidumpDirectoryKey "MinidumpDir"
#define kReporterMinidumpIDKey        "MinidumpID"
#define kReporterLogFilename          "uploads.log"
#define kDefaultLibrarySubdirectory   "Breakpad"

None of these are "namespaced" in any way, which means you can get some really 
weird effects from header bleed.

For example, Chrome's crash_upload_list.h contains this code:
  // Should match kReporterLogFilename in
  // breakpad/src/client/apple/Framework/BreakpadDefines.h.
  static const char* kReporterLogFilename;
If you happen to create any chain of includes that causes Breakpad.h to be 
included indirectly before crash_upload_list.h, it doesn't compile.

Original issue reported on code.google.com by stuart.morgan on 25 Jun 2012 at 9:50