diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-07 19:47:08 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-07 19:47:08 +0000 |
commit | c4c32fd86f36a5d282424eb3a4876f0601f8f097 (patch) | |
tree | 580af26d6d69af57f7b1c63b9fbb97fc42ef1877 /net/data/cache_tests | |
parent | a5624da1a85ae1e2785d8534018329e5a144e1fc (diff) | |
download | chromium_src-c4c32fd86f36a5d282424eb3a4876f0601f8f097.zip chromium_src-c4c32fd86f36a5d282424eb3a4876f0601f8f097.tar.gz chromium_src-c4c32fd86f36a5d282424eb3a4876f0601f8f097.tar.bz2 |
Disk cache: Keep a map of all open entries.
We still have a few crashes when for some reason we believe
an entry is not dirty and we follow the pointer stored by
its rankings node only to crash while accessing the memory.
I have no explanation to why the dirty id matches the current
one (a page boundary issue maybe?), but having a map with all
open entries solves the issue of having to follow pointers
from disk.
BUG=15596, b/1120346
TEST=unittests
Review URL: http://codereview.chromium.org/149218
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20067 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/data/cache_tests')
-rw-r--r-- | net/data/cache_tests/dirty_entry2/contents.txt | 67 | ||||
-rw-r--r-- | net/data/cache_tests/dirty_entry2/data_0 | bin | 0 -> 45056 bytes | |||
-rw-r--r-- | net/data/cache_tests/dirty_entry2/data_1 | bin | 0 -> 270336 bytes | |||
-rw-r--r-- | net/data/cache_tests/dirty_entry2/data_2 | bin | 0 -> 8192 bytes | |||
-rw-r--r-- | net/data/cache_tests/dirty_entry2/data_3 | bin | 0 -> 8192 bytes | |||
-rw-r--r-- | net/data/cache_tests/dirty_entry2/index | bin | 0 -> 262512 bytes |
6 files changed, 67 insertions, 0 deletions
diff --git a/net/data/cache_tests/dirty_entry2/contents.txt b/net/data/cache_tests/dirty_entry2/contents.txt new file mode 100644 index 0000000..cde34ce --- /dev/null +++ b/net/data/cache_tests/dirty_entry2/contents.txt @@ -0,0 +1,67 @@ +Index header: +num_entries: 2 +num_bytes: 27 +this_id: 1 +table_len: 64k + +head: 0x90000001 +tail: 0x90000000 + +Address: 0xa0010002 +Address: 0xa0010003 + +------------------------------- + +entry: +Address: 0xa0010002 +hash: 0x687d1422 +next: 0 +rankings_node: 0x90000000 +key_len: 13 +long_key: 0 +data_size: 0's +data_addr: 0's +key: "the first key" + +rankings: +Address: 0x90000000 +next: 0x90000000 +prev: 0x90000001 +contents: 0xa0010002 +dirty: 0 +pointer: 0 + +------------------------------- + +entry: +Address: 0xa0010003 +hash: 0x63909ecb +next: 0 +rankings_node: 0x90000001 +key_len: 14 +long_key: 0 +data_size: 0's +data_addr: 0's +key: "some other key" + +rankings: +Address: 0x90000001 +next: 0x90000000 +prev: 0x90000001 +contents: 0xa0010003 +dirty: 2 <- Next id!. +pointer: 0x0169dc48 <- Invalid. + +================================ + +Generated with: + +disk_cache::Entry *entry; +ASSERT_TRUE(cache_->CreateEntry("the first key", &entry)); +entry->Close(); + +ASSERT_TRUE(cache_->CreateEntry("some other key", &entry)); +entry->Close(); <---- Edit value* + +* Edit the value with the debugger before it is saved to disk (break on +the destructor of EntryImpl and skip the line that clears "pointer")
\ No newline at end of file diff --git a/net/data/cache_tests/dirty_entry2/data_0 b/net/data/cache_tests/dirty_entry2/data_0 Binary files differnew file mode 100644 index 0000000..5ba0deb --- /dev/null +++ b/net/data/cache_tests/dirty_entry2/data_0 diff --git a/net/data/cache_tests/dirty_entry2/data_1 b/net/data/cache_tests/dirty_entry2/data_1 Binary files differnew file mode 100644 index 0000000..446ac45 --- /dev/null +++ b/net/data/cache_tests/dirty_entry2/data_1 diff --git a/net/data/cache_tests/dirty_entry2/data_2 b/net/data/cache_tests/dirty_entry2/data_2 Binary files differnew file mode 100644 index 0000000..c7e2eb9 --- /dev/null +++ b/net/data/cache_tests/dirty_entry2/data_2 diff --git a/net/data/cache_tests/dirty_entry2/data_3 b/net/data/cache_tests/dirty_entry2/data_3 Binary files differnew file mode 100644 index 0000000..5eec973 --- /dev/null +++ b/net/data/cache_tests/dirty_entry2/data_3 diff --git a/net/data/cache_tests/dirty_entry2/index b/net/data/cache_tests/dirty_entry2/index Binary files differnew file mode 100644 index 0000000..ba2b6ca --- /dev/null +++ b/net/data/cache_tests/dirty_entry2/index |