diff --git a/client/crash_report_database_mac.mm b/client/crash_report_database_mac.mm index ca355c0..80cc5cd 100644 --- a/client/crash_report_database_mac.mm +++ b/client/crash_report_database_mac.mm @@ -94,6 +94,15 @@ bool CreateOrEnsureDirectoryExists(const base::FilePath& path) { return EnsureDirectoryExists(path); } +// Creates a long database xattr name from the short constant name. These names +// have changed, and new_name determines whether the returned xattr name will be +// the old name or its new equivalent. +std::string XattrNameInternal(const base::StringPiece& name, bool new_name) { + return base::StringPrintf(new_name ? "org.chromium.crashpad.database.%s" + : "com.googlecode.crashpad.%s", + name.data()); +} + //! \brief A CrashReportDatabase that uses HFS+ extended attributes to store //! report metadata. //! @@ -173,8 +182,7 @@ class CrashReportDatabaseMac : public CrashReportDatabase { //! //! \return `true` if all the metadata was read successfully, `false` //! otherwise. - static bool ReadReportMetadataLocked(const base::FilePath& path, - Report* report); + bool ReadReportMetadataLocked(const base::FilePath& path, Report* report); //! \brief Reads the metadata from all the reports in a database subdirectory. //! Invalid reports are skipped. @@ -183,18 +191,19 @@ class CrashReportDatabaseMac : public CrashReportDatabase { //! \param[out] reports An empty vector of reports, which will be filled. //! //! \return The operation status code. - static OperationStatus ReportsInDirectory(const base::FilePath& path, - std::vector* reports); + OperationStatus ReportsInDirectory(const base::FilePath& path, + std::vector* reports); //! \brief Creates a database xattr name from the short constant name. //! //! \param[in] name The short name of the extended attribute. //! //! \return The long name of the extended attribute. - static std::string XattrName(const base::StringPiece& name); + std::string XattrName(const base::StringPiece& name); base::FilePath base_dir_; Settings settings_; + bool xattr_new_names_; InitializationStateDcheck initialized_; DISALLOW_COPY_AND_ASSIGN(CrashReportDatabaseMac); @@ -204,6 +213,7 @@ CrashReportDatabaseMac::CrashReportDatabaseMac(const base::FilePath& path) : CrashReportDatabase(), base_dir_(path), settings_(base_dir_.Append(kSettings)), + xattr_new_names_(false), initialized_() { } @@ -230,10 +240,25 @@ bool CrashReportDatabaseMac::Initialize(bool may_create) { if (!settings_.Initialize()) return false; - // Write an xattr as the last step, to ensure the filesystem has support for - // them. This attribute will never be read. - if (!WriteXattrBool(base_dir_, XattrName(kXattrDatabaseInitialized), true)) - return false; + // Do an xattr operation as the last step, to ensure the filesystem has + // support for them. This xattr also serves as a marker for whether the + // database uses old or new xattr names. + bool value; + if (ReadXattrBool(base_dir_, + XattrNameInternal(kXattrDatabaseInitialized, true), + &value) == XattrStatus::kOK && + value) { + xattr_new_names_ = true; + } else if (ReadXattrBool(base_dir_, + XattrNameInternal(kXattrDatabaseInitialized, false), + &value) == XattrStatus::kOK && + value) { + xattr_new_names_ = false; + } else { + xattr_new_names_ = true; + if (!WriteXattrBool(base_dir_, XattrName(kXattrDatabaseInitialized), true)) + return false; + } INITIALIZATION_STATE_SET_VALID(initialized_); return true; @@ -540,7 +565,6 @@ base::ScopedFD CrashReportDatabaseMac::ObtainReportLock( return base::ScopedFD(fd); } -// static bool CrashReportDatabaseMac::ReadReportMetadataLocked( const base::FilePath& path, Report* report) { std::string uuid_string; @@ -583,7 +607,6 @@ bool CrashReportDatabaseMac::ReadReportMetadataLocked( return true; } -// static CrashReportDatabase::OperationStatus CrashReportDatabaseMac::ReportsInDirectory( const base::FilePath& path, std::vector* reports) { @@ -620,9 +643,8 @@ CrashReportDatabase::OperationStatus CrashReportDatabaseMac::ReportsInDirectory( return kNoError; } -// static std::string CrashReportDatabaseMac::XattrName(const base::StringPiece& name) { - return base::StringPrintf("com.googlecode.crashpad.%s", name.data()); + return XattrNameInternal(name, xattr_new_names_); } scoped_ptr InitializeInternal(const base::FilePath& path, diff --git a/client/prune_crash_reports.cc b/client/prune_crash_reports.cc index dadb93d..d94f212 100644 --- a/client/prune_crash_reports.cc +++ b/client/prune_crash_reports.cc @@ -59,10 +59,9 @@ void PruneCrashReportDatabase(CrashReportDatabase* database, } } - // TODO(rsesek): For databases that do not use a directory structure, - // it is possible for the metadata sidecar to become corrupted and thus - // leave orphaned crash report files on-disk. - // https://code.google.com/p/crashpad/issues/detail?id=66 + // TODO(rsesek): For databases that do not use a directory structure, it is + // possible for the metadata sidecar to become corrupted and thus leave + // orphaned crash report files on-disk. https://crashpad.chromium.org/bug/66 } // static diff --git a/doc/appengine/README b/doc/appengine/README index d3f4d22..00a7f76 100644 --- a/doc/appengine/README +++ b/doc/appengine/README @@ -1,4 +1,4 @@ -This is the App Engine app that serves https://crashpad-home.appspot.com/. +This is the App Engine app that serves https://crashpad.chromium.org/. To work on this app, obtain the App Engine SDK for Go from https://cloud.google.com/appengine/downloads. Unpacking it produces a diff --git a/doc/developing.ad b/doc/developing.ad index 58ca79d..9174f6b 100644 --- a/doc/developing.ad +++ b/doc/developing.ad @@ -83,7 +83,7 @@ $ *gclient sync* == Building -Crashpad uses https://gyp.googlecode.com/[GYP] to generate +Crashpad uses https://gyp.gsrc.io/[GYP] to generate https://martine.github.io/ninja/[Ninja] build files. The build is described by `.gyp` files throughout the Crashpad source code tree. The `build/gyp_crashpad.py` script runs GYP properly for Crashpad, and is also @@ -106,12 +106,13 @@ need to install it separately. == Testing -Crashpad uses https://googletest.googlecode.com/[Google Test] as its +Crashpad uses https://github.com/google/googletest/[Google Test] as its unit-testing framework, and some tests use -https://googlemock.googlecode.com/[Google Mock] as well. Its tests are currently -split up into several test executables, each dedicated to testing a different -component. This may change in the future. After a successful build, the test -executables will be found at `out/Debug/crashpad_*_test`. +https://github.com/google/googletest/tree/master/googlemock/[Google Mock] as +well. Its tests are currently split up into several test executables, each +dedicated to testing a different component. This may change in the future. After +a successful build, the test executables will be found at +`out/Debug/crashpad_*_test`. [subs="verbatim,quotes"] ---- diff --git a/doc/index.ad b/doc/index.ad index f9031d2..5bb16f8 100644 --- a/doc/index.ad +++ b/doc/index.ad @@ -16,16 +16,16 @@ = Crashpad -https://crashpad-home.appspot.com/[Crashpad] is a crash-reporting system. +https://crashpad.chromium.org/[Crashpad] is a crash-reporting system. == Documentation * link:status.html[Project status] * link:developing.html[Developing Crashpad]: instructions for getting the source code, building, testing, and contributing to the project. - * https://crashpad-home.appspot.com/doxygen/index.html[Crashpad interface + * https://crashpad.chromium.org/doxygen/index.html[Crashpad interface documentation] - * https://crashpad-home.appspot.com/man/index.html[Crashpad tool man pages] + * https://crashpad.chromium.org/man/index.html[Crashpad tool man pages] == Source Code @@ -34,8 +34,8 @@ https://chromium.googlesource.com/crashpad/crashpad. == Other Links - * Bugs can be reported at the - https://code.google.com/p/crashpad/issues/entry[Crashpad issue tracker]. + * Bugs can be reported at the https://crashpad.chromium.org/bug/new[Crashpad + issue tracker]. * The https://build.chromium.org/p/client.crashpad[Crashpad Buildbot] performs automated builds and tests. * https://groups.google.com/a/chromium.org/group/crashpad-dev[crashpad-dev] is diff --git a/doc/status.ad b/doc/status.ad index 301195f..e980b9d 100644 --- a/doc/status.ad +++ b/doc/status.ad @@ -28,18 +28,17 @@ https://chromium.googlesource.com/chromium/src/+/d413b2dcb54d523811d386f1ff4084f == In Progress Crashpad is actively being bootstrapped on -https://code.google.com/p/crashpad/issues/detail?id=1[Windows]. All major -components are now working on Windows, and integration into Chromium is expected -shortly. +https://crashpad.chromium.org/bug/1[Windows]. All major components are now +working on Windows, and integration into Chromium is expected shortly. Initial work on a Crashpad client for -https://code.google.com/p/crashpad/issues/detail?id=30[Android] has begun. This -is currently in the design phase. +https://crashpad.chromium.org/bug/30[Android] has begun. This is currently in +the design phase. == Future There are plans to bring Crashpad clients to other operating systems in the future, including a more generic non-Android Linux implementation. There are -also plans to implement a -https://code.google.com/p/crashpad/issues/detail?id=29[crash report processor] -as part of Crashpad. No timeline for completing this work has been set yet. +also plans to implement a https://crashpad.chromium.org/bug/29[crash report +processor] as part of Crashpad. No timeline for completing this work has been +set yet. diff --git a/doc/support/generate.sh b/doc/support/generate.sh index f4410ae..0a2be48 100755 --- a/doc/support/generate.sh +++ b/doc/support/generate.sh @@ -43,7 +43,7 @@ done # Move doc/index.html to index.html, adjusting relative paths to other files in # doc. -base_url=https://crashpad-home.appspot.com/ +base_url=https://crashpad.chromium.org/ ${sed_ext} -e 's%%%g' \ -e 's%%%g' \ -e 's%tv_sec = 0; snapshot_time->tv_usec = 0; } void ProcessSnapshotMinidump::ProcessStartTime(timeval* start_time) const { INITIALIZATION_STATE_DCHECK_VALID(initialized_); - NOTREACHED(); // https://code.google.com/p/crashpad/issues/detail?id=10 + NOTREACHED(); // https://crashpad.chromium.org/bug/10 start_time->tv_sec = 0; start_time->tv_usec = 0; } @@ -121,7 +121,7 @@ void ProcessSnapshotMinidump::ProcessStartTime(timeval* start_time) const { void ProcessSnapshotMinidump::ProcessCPUTimes(timeval* user_time, timeval* system_time) const { INITIALIZATION_STATE_DCHECK_VALID(initialized_); - NOTREACHED(); // https://code.google.com/p/crashpad/issues/detail?id=10 + NOTREACHED(); // https://crashpad.chromium.org/bug/10 user_time->tv_sec = 0; user_time->tv_usec = 0; system_time->tv_sec = 0; @@ -145,20 +145,20 @@ ProcessSnapshotMinidump::AnnotationsSimpleMap() const { // annotations_simple_map_ to be lazily constructed: InitializeCrashpadInfo() // could be called here, and from other locations that require it, rather than // calling it from Initialize(). - // https://code.google.com/p/crashpad/issues/detail?id=9 + // https://crashpad.chromium.org/bug/9 INITIALIZATION_STATE_DCHECK_VALID(initialized_); return annotations_simple_map_; } const SystemSnapshot* ProcessSnapshotMinidump::System() const { INITIALIZATION_STATE_DCHECK_VALID(initialized_); - NOTREACHED(); // https://code.google.com/p/crashpad/issues/detail?id=10 + NOTREACHED(); // https://crashpad.chromium.org/bug/10 return nullptr; } std::vector ProcessSnapshotMinidump::Threads() const { INITIALIZATION_STATE_DCHECK_VALID(initialized_); - NOTREACHED(); // https://code.google.com/p/crashpad/issues/detail?id=10 + NOTREACHED(); // https://crashpad.chromium.org/bug/10 return std::vector(); } @@ -173,27 +173,27 @@ std::vector ProcessSnapshotMinidump::Modules() const { const ExceptionSnapshot* ProcessSnapshotMinidump::Exception() const { INITIALIZATION_STATE_DCHECK_VALID(initialized_); - NOTREACHED(); // https://code.google.com/p/crashpad/issues/detail?id=10 + NOTREACHED(); // https://crashpad.chromium.org/bug/10 return nullptr; } std::vector ProcessSnapshotMinidump::MemoryMap() const { INITIALIZATION_STATE_DCHECK_VALID(initialized_); - NOTREACHED(); // https://code.google.com/p/crashpad/issues/detail?id=10 + NOTREACHED(); // https://crashpad.chromium.org/bug/10 return std::vector(); } std::vector ProcessSnapshotMinidump::Handles() const { INITIALIZATION_STATE_DCHECK_VALID(initialized_); - NOTREACHED(); // https://code.google.com/p/crashpad/issues/detail?id=10 + NOTREACHED(); // https://crashpad.chromium.org/bug/10 return std::vector(); } std::vector ProcessSnapshotMinidump::ExtraMemory() const { INITIALIZATION_STATE_DCHECK_VALID(initialized_); - NOTREACHED(); // https://code.google.com/p/crashpad/issues/detail?id=10 + NOTREACHED(); // https://crashpad.chromium.org/bug/10 return std::vector(); } diff --git a/snapshot/win/exception_snapshot_win.cc b/snapshot/win/exception_snapshot_win.cc index 731669a..07b1c8e 100644 --- a/snapshot/win/exception_snapshot_win.cc +++ b/snapshot/win/exception_snapshot_win.cc @@ -153,7 +153,7 @@ bool ExceptionSnapshotWin::InitializeFromExceptionPointers( for (DWORD i = 0; i < first_record.NumberParameters; ++i) codes_.push_back(first_record.ExceptionInformation[i]); if (first_record.ExceptionRecord) { - // https://code.google.com/p/crashpad/issues/detail?id=43 + // https://crashpad.chromium.org/bug/43 LOG(WARNING) << "dropping chained ExceptionRecord"; } diff --git a/snapshot/win/module_snapshot_win.cc b/snapshot/win/module_snapshot_win.cc index f45bedc..3876fb1 100644 --- a/snapshot/win/module_snapshot_win.cc +++ b/snapshot/win/module_snapshot_win.cc @@ -161,7 +161,7 @@ std::vector ModuleSnapshotWin::AnnotationsVector() const { INITIALIZATION_STATE_DCHECK_VALID(initialized_); // These correspond to system-logged things on Mac. We don't currently track // any of these on Windows, but could in the future. - // See https://code.google.com/p/crashpad/issues/detail?id=38. + // See https://crashpad.chromium.org/bug/38. return std::vector(); } diff --git a/snapshot/win/pe_image_reader.cc b/snapshot/win/pe_image_reader.cc index 6f5bb61..b6bb7aa 100644 --- a/snapshot/win/pe_image_reader.cc +++ b/snapshot/win/pe_image_reader.cc @@ -191,7 +191,7 @@ bool PEImageReader::ReadDebugDirectoryInformation(UUID* uuid, if (*reinterpret_cast(data.get()) != CodeViewRecordPDB70::kSignature) { // TODO(scottmg): Consider supporting other record types, see - // https://code.google.com/p/crashpad/issues/detail?id=47. + // https://crashpad.chromium.org/bug/47. LOG(WARNING) << "encountered non-7.0 CodeView debug record"; continue; } diff --git a/snapshot/win/process_snapshot_win.cc b/snapshot/win/process_snapshot_win.cc index bc3b7b1..4146ae8 100644 --- a/snapshot/win/process_snapshot_win.cc +++ b/snapshot/win/process_snapshot_win.cc @@ -353,7 +353,7 @@ void ProcessSnapshotWin::AddMemorySnapshot( // useful for the LDR module lists which are a set of doubly-linked lists, all // pointing to the same module name strings. // TODO(scottmg): A more general version of this, handling overlapping, - // contained, etc. https://code.google.com/p/crashpad/issues/detail?id=61. + // contained, etc. https://crashpad.chromium.org/bug/61. for (const auto& memory_snapshot : *into) { if (memory_snapshot->Address() == address && memory_snapshot->Size() == size) { diff --git a/snapshot/win/thread_snapshot_win.cc b/snapshot/win/thread_snapshot_win.cc index 3593a7e..9c8c9ea 100644 --- a/snapshot/win/thread_snapshot_win.cc +++ b/snapshot/win/thread_snapshot_win.cc @@ -112,8 +112,7 @@ uint64_t ThreadSnapshotWin::ThreadSpecificDataAddress() const { std::vector ThreadSnapshotWin::ExtraMemory() const { INITIALIZATION_STATE_DCHECK_VALID(initialized_); // TODO(scottmg): Ensure this region is readable, and make sure we don't - // discard the entire dump if it isn't. - // https://code.google.com/p/crashpad/issues/detail?id=59 + // discard the entire dump if it isn't. https://crashpad.chromium.org/bug/59 return std::vector(1, &teb_); } diff --git a/test/mac/mach_multiprocess.cc b/test/mac/mach_multiprocess.cc index 65ea46d..0458ef3 100644 --- a/test/mac/mach_multiprocess.cc +++ b/test/mac/mach_multiprocess.cc @@ -92,7 +92,7 @@ void MachMultiprocess::PreFork() { // Set up the parent port and register it with the bootstrap server before // forking, so that it’s guaranteed to be there when the child attempts to // look it up. - info_->service_name = "com.googlecode.crashpad.test.mach_multiprocess."; + info_->service_name = "org.chromium.crashpad.test.mach_multiprocess."; for (int index = 0; index < 16; ++index) { info_->service_name.append(1, base::RandInt('A', 'Z')); } diff --git a/test/scoped_temp_dir_posix.cc b/test/scoped_temp_dir_posix.cc index 2618dc8..34db76f 100644 --- a/test/scoped_temp_dir_posix.cc +++ b/test/scoped_temp_dir_posix.cc @@ -33,7 +33,7 @@ void ScopedTempDir::Rename() { // static base::FilePath ScopedTempDir::CreateTemporaryDirectory() { - char dir_template[] = "/tmp/com.googlecode.crashpad.test.XXXXXX"; + char dir_template[] = "/tmp/org.chromium.crashpad.test.XXXXXX"; PCHECK(mkdtemp(dir_template)) << "mkdtemp " << dir_template; return base::FilePath(dir_template); } diff --git a/third_party/gmock/README.crashpad b/third_party/gmock/README.crashpad index 783f942..430d6c5 100644 --- a/third_party/gmock/README.crashpad +++ b/third_party/gmock/README.crashpad @@ -1,6 +1,6 @@ Name: Google C++ Mocking Framework (googlemock) Short Name: gmock -URL: https://googlemock.googlecode.com/ +URL: https://github.com/google/googletest/tree/master/googlemock/ Revision: See DEPS License: BSD 3-clause License File: gmock/LICENSE diff --git a/third_party/gtest/README.crashpad b/third_party/gtest/README.crashpad index 5bc23a0..364f0e1 100644 --- a/third_party/gtest/README.crashpad +++ b/third_party/gtest/README.crashpad @@ -1,6 +1,6 @@ Name: Google C++ Testing Framework (googletest) Short Name: gtest -URL: https://googletest.googlecode.com/ +URL: https://github.com/google/googletest/ Revision: See DEPS License: BSD 3-clause License File: gtest/LICENSE diff --git a/third_party/gyp/README.crashpad b/third_party/gyp/README.crashpad index 6121d7c..18eb164 100644 --- a/third_party/gyp/README.crashpad +++ b/third_party/gyp/README.crashpad @@ -1,6 +1,6 @@ Name: GYP (Generate Your Projects) Short Name: gyp -URL: https://gyp.googlecode.com/ +URL: https://gyp.gsrc.io/ Revision: See DEPS License: BSD 3-clause License File: gyp/LICENSE diff --git a/util/mac/service_management_test.mm b/util/mac/service_management_test.mm index 18eb9d6..9f08b57 100644 --- a/util/mac/service_management_test.mm +++ b/util/mac/service_management_test.mm @@ -117,9 +117,9 @@ TEST(ServiceManagement, SubmitRemoveJob) { base::StringPrintf("sleep 10; echo %s", cookie.c_str()); NSString* shell_script_ns = base::SysUTF8ToNSString(shell_script); - const char kJobLabel[] = "com.googlecode.crashpad.test.service_management"; + const char kJobLabel[] = "org.chromium.crashpad.test.service_management"; NSDictionary* job_dictionary_ns = @{ - @LAUNCH_JOBKEY_LABEL : @"com.googlecode.crashpad.test.service_management", + @LAUNCH_JOBKEY_LABEL : @"org.chromium.crashpad.test.service_management", @LAUNCH_JOBKEY_RUNATLOAD : @YES, @LAUNCH_JOBKEY_PROGRAMARGUMENTS : @[ @"/bin/sh", @"-c", shell_script_ns, ], diff --git a/util/mach/child_port_handshake.cc b/util/mach/child_port_handshake.cc index e45d6ae..ff779df 100644 --- a/util/mach/child_port_handshake.cc +++ b/util/mach/child_port_handshake.cc @@ -97,7 +97,7 @@ mach_port_t ChildPortHandshakeServer::RunServer( errno = pthread_threadid_np(pthread_self(), &thread_id); PCHECK(errno == 0) << "pthread_threadid_np"; std::string service_name = base::StringPrintf( - "com.googlecode.crashpad.child_port_handshake.%d.%llu.%016llx", + "org.chromium.crashpad.child_port_handshake.%d.%llu.%016llx", getpid(), thread_id, base::RandUint64()); diff --git a/util/mach/mach_extensions_test.cc b/util/mach/mach_extensions_test.cc index 04af5df..99ddee9 100644 --- a/util/mach/mach_extensions_test.cc +++ b/util/mach/mach_extensions_test.cc @@ -138,7 +138,7 @@ TEST(MachExtensions, BootstrapCheckInAndLookUp) { report_crash(BootstrapLookUp("com.apple.ReportCrash")); EXPECT_NE(report_crash, kMachPortNull); - std::string service_name = "com.googlecode.crashpad.test.bootstrap_check_in."; + std::string service_name = "org.chromium.crashpad.test.bootstrap_check_in."; for (int index = 0; index < 16; ++index) { service_name.append(1, base::RandInt('A', 'Z')); } diff --git a/util/win/capture_context.asm b/util/win/capture_context.asm index 933f882..56efec7 100644 --- a/util/win/capture_context.asm +++ b/util/win/capture_context.asm @@ -351,8 +351,7 @@ $FXSave: ; Free the stack space used for the temporary fxsave area. lea esp, [ebp-8] - ; TODO(mark): AVX/xsave support. - ; https://code.google.com/p/crashpad/issues/detail?id=58 + ; TODO(mark): AVX/xsave support. https://crashpad.chromium.org/bug/58 $FXSaveDone: ; fnsave reinitializes the FPU with an implicit finit operation, so use frstor @@ -491,8 +490,7 @@ CAPTURECONTEXT_SYMBOL proc frame ; declared as 16-byte-aligned, which is correct for this operation. fxsave [rcx.CONTEXT].c_FltSave - ; TODO(mark): AVX/xsave support. - ; https://code.google.com/p/crashpad/issues/detail?id=58 + ; TODO(mark): AVX/xsave support. https://crashpad.chromium.org/bug/58 ; The register parameter home address fields aren’t used, so zero them out. mov [rcx.CONTEXT].c_P1Home, 0 diff --git a/util/win/process_info.h b/util/win/process_info.h index f8ed4ae..ca1935b 100644 --- a/util/win/process_info.h +++ b/util/win/process_info.h @@ -180,7 +180,7 @@ class ProcessInfo { std::vector memory_info_; // Handles() is logically const, but updates this member on first retrieval. - // See https://code.google.com/p/crashpad/issues/detail?id=9. + // See https://crashpad.chromium.org/bug/9. mutable std::vector handles_; bool is_64_bit_;