• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Index file:
2magic: c103cac3
3version: 2.0
4entries: 2                  <---- there is an extra entry on the lru.
5total bytes: 47
6last file number: 0
7current id: 3
8table length: 65536
9last crash: 1
10experiment: 0
11head 0: 0x90000000
12tail 0: 0x90000001
13size 0: 0x0
14head 1: 0x0
15tail 1: 0x0
16size 1: 0x0
17head 2: 0x0
18tail 2: 0x0
19size 2: 0x0
20head 3: 0x0
21tail 3: 0x0
22size 3: 0x0
23head 4: 0x0
24tail 4: 0x0
25size 4: 0x0
26transaction: 0x0
27operation: 0
28operation list: 0
29-------------------------
30
31Block file: data_0
32magic: c104cac3
33version: 2.0
34file id: 0
35next file id: 0
36entry size: 36
37current entries: 2
38max entries: 1024
39updating: 0
40empty sz 1: 0
41empty sz 2: 1
42empty sz 3: 0
43empty sz 4: 255
44user 0: 0x0
45user 1: 0x0
46user 2: 0x0
47user 3: 0x0
48-------------------------
49
50Block file: data_1
51magic: c104cac3
52version: 2.0
53file id: 1
54next file id: 0
55entry size: 256
56current entries: 4
57max entries: 1024
58updating: 0
59empty sz 1: 0
60empty sz 2: 1
61empty sz 3: 0
62empty sz 4: 254
63user 0: 0x0
64user 1: 0x0
65user 2: 0x0
66user 3: 0x0
67-------------------------
68
69Block file: data_2
70magic: c104cac3
71version: 2.0
72file id: 2
73next file id: 0
74entry size: 1024
75current entries: 0
76max entries: 0
77updating: 0
78empty sz 1: 0
79empty sz 2: 0
80empty sz 3: 0
81empty sz 4: 0
82user 0: 0x0
83user 1: 0x0
84user 2: 0x0
85user 3: 0x0
86-------------------------
87
88Block file: data_3
89magic: c104cac3
90version: 2.0
91file id: 3
92next file id: 0
93entry size: 4096
94current entries: 0
95max entries: 0
96updating: 0
97empty sz 1: 0
98empty sz 2: 0
99empty sz 3: 0
100empty sz 4: 0
101user 0: 0x0
102user 1: 0x0
103user 2: 0x0
104user 3: 0x0
105-------------------------
106
107Entry at 0xa0010002
108hash: 0xc24ac438
109next entry: 0x0
110rankings: 0x90000000
111key length: 13
112key: "The first key"
113key addr: 0x0
114reuse count: 0
115refetch count: 0
116state: 0
117data size 0: 20
118data addr 0: 0xa0010005
119data size 1: 0
120data addr 1: 0x0
121data size 2: 0
122data addr 2: 0x0
123data size 3: 0
124data addr 3: 0x0
125----------
126
127Rankings at 0x90000000
128next: 0x90000001
129prev: 0x90000000
130entry: 0xa0010002
131dirty: 0
132pointer: 0x0
133
134================================
135
136Generated with: (see steps on the bug 69135)
137
138  SetMask(0x1);  // 2-entry table.
139  SetMaxSize(0x3000);  // 12 kB.
140  InitCache();
141
142  std::string key1("The first key");
143  std::string key2("The Second key");
144  std::string key3("The third key");
145  disk_cache::Entry* entry;
146
147  ASSERT_EQ(net::OK, CreateEntry(key1, &entry));
148  entry->Close();
149  ASSERT_EQ(net::OK, CreateEntry(key2, &entry));
150  entry->Close();
151  ASSERT_EQ(net::OK, CreateEntry(key3, &entry));
152  entry->Close();
153
154  const int kSize = 20;
155  ASSERT_EQ(net::OK, OpenEntry(key1, &entry));
156  scoped_refptr<net::IOBuffer> buf = new net::IOBuffer(kSize);
157  memset(buf->data(), 0, kSize);
158  EXPECT_EQ(kSize, WriteData(entry, 0, 0, buf, kSize, false));
159  entry->Close();
160
161  ASSERT_EQ(net::OK, OpenEntry(key2, &entry));  <--- 1st crash.
162  ASSERT_NE(net::OK, OpenEntry(key2, &entry));  <--- 2nd crash. *
163
164  ASSERT_EQ(net::OK, DoomEntry(key3));
165
166(*) and trick the code into deleting the dirty flag.