Comment #6 on issue 8476 by [email protected]: Crash in
SessionBackend::AppendCommands
http://code.google.com/p/chromium/issues/detail?id=8476
The following revision refers to this bug:
http://src.chromium.org/viewvc/chrome?view=rev&revision=11710
------------------------------------------------------------------------
r11710 | [email protected] | 2009-03-14 11:09:30 -0700 (Sat, 14 Mar
2009) | 19 lines
Changed paths:
M
http://src.chromium.org/viewvc/chrome/branches/169/src/chrome/browser/sessions/session_backend.cc?r1=11710&r2=11709
M
http://src.chromium.org/viewvc/chrome/branches/169/src/chrome/browser/sessions/session_backend.h?r1=11710&r2=11709
M
http://src.chromium.org/viewvc/chrome/branches/169/src/chrome/browser/sessions/session_backend_unittest.cc?r1=11710&r2=11709
Merge 11262 - Fixes possible crash in SessionBackend. I believe what's
happening
here is we fail to create the file, and so current_session_file_.get()
is NULL and we crash. current_session_file_.get() is NULL if
OpenAndWriteHeader returns NULL (which is does if the full header
isn't written correctly.
Here's how I'm changing the code:
. The file is now truncated instead of closed/reopened. Hopefully this
avoids the possibility of a scanner locking the file and the delete failing.
. Added a unit test for coverage of truncation.
. The file is opened in exclusive access. There is no reason why a scanner
should open this file.
. Added null checks.
BUG=8476
TEST=none
Review URL: http://codereview.chromium.org/39275
[email protected]
Review URL: http://codereview.chromium.org/42209
------------------------------------------------------------------------
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---