Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
Commit75aa17f
committed
gh-132641: Fix race in lru_cache due to inconsistent critical section use.
The bounded_lru_cache code was using a critical section on the lru cacheobject to protect dictionary accesses in some code paths, but using thecritical section on the dictionary itself to protect accesses in othercode paths. This led to races since not all threads agreed on which lockthey needed to be holding.Instead, always use a critical section on the underlying dictionary,rather than the lru cache object itself.Fixes#1326411 parent27ed645 commit75aa17f
File tree
5 files changed
+94
-5
lines changed- Include/internal
- Lib/test/test_free_threading
- Misc/NEWS.d/next/Library
- Modules
- Objects
5 files changed
+94
-5
lines changedLines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
150 | 150 |
| |
151 | 151 |
| |
152 | 152 |
| |
| 153 | + | |
| 154 | + | |
153 | 155 |
| |
154 | 156 |
| |
155 | 157 |
| |
|
Lines changed: 75 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + |
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + |
Lines changed: 11 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1383 | 1383 |
| |
1384 | 1384 |
| |
1385 | 1385 |
| |
1386 |
| - | |
1387 |
| - | |
| 1386 | + | |
| 1387 | + | |
1388 | 1388 |
| |
1389 | 1389 |
| |
1390 | 1390 |
| |
| |||
1453 | 1453 |
| |
1454 | 1454 |
| |
1455 | 1455 |
| |
1456 |
| - | |
1457 |
| - | |
| 1456 | + | |
| 1457 | + | |
1458 | 1458 |
| |
1459 | 1459 |
| |
1460 | 1460 |
| |
| |||
1689 | 1689 |
| |
1690 | 1690 |
| |
1691 | 1691 |
| |
1692 |
| - | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
1693 | 1699 |
| |
1694 | 1700 |
| |
1695 | 1701 |
| |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2915 | 2915 |
| |
2916 | 2916 |
| |
2917 | 2917 |
| |
| 2918 | + | |
| 2919 | + | |
| 2920 | + | |
| 2921 | + | |
| 2922 | + | |
2918 | 2923 |
| |
2919 | 2924 |
| |
2920 | 2925 |
| |
|
0 commit comments
Comments
(0)