summaryrefslogtreecommitdiffstats
path: root/net/data
diff options
context:
space:
mode:
Diffstat (limited to 'net/data')
-rw-r--r--net/data/cache_tests/bad_rankings3/contents.txt92
-rw-r--r--net/data/cache_tests/bad_rankings3/data_0bin0 -> 45056 bytes
-rw-r--r--net/data/cache_tests/bad_rankings3/data_1bin0 -> 270336 bytes
-rw-r--r--net/data/cache_tests/bad_rankings3/data_2bin0 -> 8192 bytes
-rw-r--r--net/data/cache_tests/bad_rankings3/data_3bin0 -> 8192 bytes
-rw-r--r--net/data/cache_tests/bad_rankings3/indexbin0 -> 262512 bytes
6 files changed, 92 insertions, 0 deletions
diff --git a/net/data/cache_tests/bad_rankings3/contents.txt b/net/data/cache_tests/bad_rankings3/contents.txt
new file mode 100644
index 0000000..d85287b
--- /dev/null
+++ b/net/data/cache_tests/bad_rankings3/contents.txt
@@ -0,0 +1,92 @@
+Index file:
+version: 2.1
+entries: 3
+current id: 1
+last crash: 1
+head 0: 0x90000002
+tail 0: 0x90000002
+size 0: 0x1
+head 1: 0x90000001 <----
+tail 1: 0x90000000
+size 1: 0x2
+transaction: 0x0
+-------------------------
+
+Entry at 0xa0010002
+hash: 0x687d1422
+next entry: 0x0
+rankings: 0x90000000
+key length: 13
+key: "the first key"
+key addr: 0x0
+reuse count: 1
+----------
+
+Rankings at 0x90000000
+next: 0x90000000
+prev: 0x90000001
+entry: 0xa0010002
+dirty: 0
+----------
+
+Entry at 0xa0010003
+hash: 0x4a70620e
+next entry: 0x0
+rankings: 0x90000001
+key length: 14
+key: "the second key"
+key addr: 0x0
+reuse count: 0 <---- list 0
+----------
+
+Rankings at 0x90000001
+next: 0x90000000
+prev: 0x90000001 <----- head
+entry: 0xa0010003
+dirty: 1 <----- This was actually inserted on list 1
+----------
+
+Entry at 0xa0010004
+hash: 0x63909ecb
+next entry: 0x0
+rankings: 0x90000002
+key length: 14
+key: "some other key"
+key addr: 0x0
+reuse count: 0
+----------
+
+Rankings at 0x90000002
+next: 0x90000002
+prev: 0x90000002
+entry: 0xa0010004
+dirty: 0
+----------
+
+================================
+
+Generated with:
+
+ SetNewEviction();
+ SetMaxSize(20 * 1024 * 1024);
+ InitCache();
+ const char* kName1 = "the first key";
+ const char* kName2 = "the second key";
+ disk_cache::Entry* entry;
+ ASSERT_EQ(net::OK, CreateEntry(kName1, &entry));
+ entry->Close();
+ ASSERT_EQ(net::OK, CreateEntry(kName2, &entry));
+ entry->Close();
+ ASSERT_EQ(net::OK, CreateEntry("some other key", &entry));
+ entry->Close();
+
+ ASSERT_EQ(net::OK, OpenEntry(kName1, &entry));
+ entry->Close();
+
+ ASSERT_EQ(net::OK, OpenEntry(kName2, &entry));
+
+Set a breakpoint on that last line, and when the entry is moved from one list to another, crash the process:
+
+ rankings_->Remove(entry->rankings(), Rankings::NO_USE);
+ rankings_->Insert(entry->rankings(), false, Rankings::LOW_USE);
+ entry->entry()->Store(); <---- crash here
diff --git a/net/data/cache_tests/bad_rankings3/data_0 b/net/data/cache_tests/bad_rankings3/data_0
new file mode 100644
index 0000000..ce35b75
--- /dev/null
+++ b/net/data/cache_tests/bad_rankings3/data_0
Binary files differ
diff --git a/net/data/cache_tests/bad_rankings3/data_1 b/net/data/cache_tests/bad_rankings3/data_1
new file mode 100644
index 0000000..5585567
--- /dev/null
+++ b/net/data/cache_tests/bad_rankings3/data_1
Binary files differ
diff --git a/net/data/cache_tests/bad_rankings3/data_2 b/net/data/cache_tests/bad_rankings3/data_2
new file mode 100644
index 0000000..c7e2eb9
--- /dev/null
+++ b/net/data/cache_tests/bad_rankings3/data_2
Binary files differ
diff --git a/net/data/cache_tests/bad_rankings3/data_3 b/net/data/cache_tests/bad_rankings3/data_3
new file mode 100644
index 0000000..5eec973
--- /dev/null
+++ b/net/data/cache_tests/bad_rankings3/data_3
Binary files differ
diff --git a/net/data/cache_tests/bad_rankings3/index b/net/data/cache_tests/bad_rankings3/index
new file mode 100644
index 0000000..8bb7585
--- /dev/null
+++ b/net/data/cache_tests/bad_rankings3/index
Binary files differ