Commit b2aab6c
fix: address PR review feedback (race condition, regex safety, perf)
- ClassDataLoader: fix double-define race in findClass() by adding
registerAsParallelCapable() and synchronized(getClassLoadingLock(name))
with double-checked locking to prevent LinkageError from concurrent
class definitions
- EmbeddedExtensionRepository: fix regex backtracking in isValidClassName()
by removing $ from package-segment character class, and extract static
Pattern field to avoid recompilation on each call
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent f43221d commit b2aab6c
2 files changed
Lines changed: 13 additions & 16 deletions
File tree
- btrace-extension/src/main/java/org/openjdk/btrace/extension/impl
Lines changed: 7 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
54 | 58 | | |
55 | 59 | | |
56 | 60 | | |
| |||
76 | 80 | | |
77 | 81 | | |
78 | 82 | | |
79 | | - | |
80 | | - | |
81 | | - | |
| 83 | + | |
82 | 84 | | |
83 | 85 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
| 86 | + | |
88 | 87 | | |
89 | 88 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
| 89 | + | |
94 | 90 | | |
95 | 91 | | |
96 | 92 | | |
97 | 93 | | |
98 | 94 | | |
99 | | - | |
100 | | - | |
101 | 95 | | |
102 | 96 | | |
103 | 97 | | |
104 | | - | |
105 | 98 | | |
106 | 99 | | |
107 | 100 | | |
| |||
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
74 | 79 | | |
75 | 80 | | |
76 | 81 | | |
| |||
298 | 303 | | |
299 | 304 | | |
300 | 305 | | |
301 | | - | |
302 | | - | |
| 306 | + | |
303 | 307 | | |
304 | 308 | | |
305 | 309 | | |
| |||
0 commit comments