Commit d5bb7b8
Avoid a race condition in opt-viewer/optrecord (llvm#131214)
See https://bugzilla.redhat.com/2336915
See https://reviews.llvm.org/D41784?id=
See
androm3da/optviewer-demo#4 (comment)
Fixes llvm#62403.
The race condition happened when the demangler_proc was being set. The
locking mechanism itself happened too late.
This way, the lock always exists (to avoid a race when creating it) and
is always used when *creating* demangler_proc.
(cherry picked from commit e0f8898)1 parent d15fef4 commit d5bb7b8
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
73 | | - | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
| |||
323 | 325 | | |
324 | 326 | | |
325 | 327 | | |
326 | | - | |
327 | | - | |
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
| |||
0 commit comments