Commit 0f4dc93
authored
[lldb][Language] Pass SymbolNameFitsToLanguage parameter by const-ref (#167684)
We've been seeing (rare) crashes from both
`CPlusPlusLanguage::SymbolNameFitsToLanguage` and
`ObjCLanguage::SymbolNameFitsToLanguage` when we try to read contents of
the `ConstString`s of the `Mangled` parameter. I'm not entirely sure how
that can happen (current theory is corrupted stack somehow which
overwrites `ConstString::m_string` to an invalid pointer) but I'm not
able to confirm that.
One thing these crashes had in common is that they operate on the
`Mangled` object we copied into `SymbolNameFitsToLanguage` by value.
While I can't see off the top why that would cause it to contain
unintiailized/corrupt `ConstString`s, the class is sufficiently large
enough to probably pass it by `const &` anyway. This is what this patch
does.
rdar://1645196481 parent c5eb7eb commit 0f4dc93
File tree
5 files changed
+7
-5
lines changed- lldb
- include/lldb/Target
- source/Plugins/Language
- CPlusPlus
- ObjC
5 files changed
+7
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
322 | 324 | | |
323 | 325 | | |
324 | 326 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
238 | | - | |
| 238 | + | |
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| |||
0 commit comments