Commit d684cb8
authored
Fix a use-after-free crash in ResetObjCLayout (#170360)
operator[] can potentially cause reallocation and invalidate live
iterators if it's called with a key that isn't present in the DenseMap.
Call lookup() instead to prevent the function from inserting new entries
into the DenseMap for ObjC classes that don't have any subclasses.
rdar://1654483321 parent 42bd2b5 commit d684cb8
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12040 | 12040 | | |
12041 | 12041 | | |
12042 | 12042 | | |
12043 | | - | |
| 12043 | + | |
12044 | 12044 | | |
12045 | 12045 | | |
12046 | 12046 | | |
| |||
0 commit comments