Commit 7fdac0a
committed
Stop re-using NthIndexCache to avoid ABA problem
I just noticed that the NthIndexCache is internally keyed on the pointer to the
selectors themselves which I think opens this up for an ABA problem, i.e. after
dropping a selector and allocating a new one at the same address but with
different content, the cache might result in incorrect matches.
Hence, I just avoided re-use completely which is certainly correct if
unnecessarily inefficient, but I fear proper re-use would need to be
user-visible.1 parent ab207c9 commit 7fdac0a
1 file changed
+13
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
13 | | - | |
14 | 12 | | |
15 | 13 | | |
16 | 14 | | |
| |||
46 | 44 | | |
47 | 45 | | |
48 | 46 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
68 | 60 | | |
69 | 61 | | |
70 | 62 | | |
| |||
0 commit comments