Open Bug 1408473 Opened 7 years ago Updated 2 years ago

RegisterAppMemory probably doesn't work in child processes

Categories

(Toolkit :: Crash Reporting, enhancement)

enhancement

Tracking

()

People

(Reporter: ted, Unassigned)

Details

bholley added a diagnostic annotation using RegisterAppMemory recently but I wasn't able to actually locate the memory region in minidumps from crash-stats. Looking more closely at the code, I don't think RegisterAppMemory actually works in child processes!

The implementation just calls ExceptionHandler::RegisterAppMemory, and the Windows/Linux implementations just store the address and size in a list in a member variable:
https://dxr.mozilla.org/mozilla-central/rev/bc7a5be76b723cf6aac1a919156e74997c5f4902/toolkit/crashreporter/breakpad-client/linux/handler/exception_handler.cc#750
https://dxr.mozilla.org/mozilla-central/rev/bc7a5be76b723cf6aac1a919156e74997c5f4902/toolkit/crashreporter/breakpad-client/windows/handler/exception_handler.cc#978

...but that doesn't get IPCed anywhere, and `CrashGenerationServer::GenerateDump` only uses memory regions it gets from the exception context:
https://dxr.mozilla.org/mozilla-central/rev/bc7a5be76b723cf6aac1a919156e74997c5f4902/toolkit/crashreporter/breakpad-client/windows/crash_generation/crash_generation_server.cc#932

This API isn't really used much, but it would be nice if it worked in content processes to avoid situations like this.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.