Commit f12b8ee
authored
Fix thread-safety bug in System.ClientModel's ReflectionContext (Azure#51253)
ReflectionContext holds onto a Dictionary and doesn't use any synchronization to access it, but ModelReaderWriter stores a singleton into a static field, which is also used unprotected. This leads to corruption of the dictionary as the ReflectionContext gets hammered on by concurrent usage.1 parent 0bf548e commit f12b8ee
File tree
1 file changed
+6
-10
lines changed- sdk/core/System.ClientModel/src/ModelReaderWriter
1 file changed
+6
-10
lines changedLines changed: 6 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
8 | | - | |
9 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 16 | + | |
21 | 17 | | |
22 | 18 | | |
23 | 19 | | |
0 commit comments