Commit 7d7a35e
committed
[Runtime] Zero out the entire witness table during instantiation.
During witness table instantiation, the witness table is constructed
several sources: the pattern, the resilient witnesses, the private
data, and default implementations. The private data area is the only
one that was being zeroed out; the rest we rely on always filling in
the data from the conformance descriptor and provided info.
However, witness table instantiation uses the presence of a NULL
pointer for a particular witness in the resulting table to indicate
that no witness fulfilled that requirement, so that it can fill in the
default witnesss. Except that, without zeroing that part of the table
beforehand, we aren't guaranteed to have a NULL pointer for witness
entries that the client (protocol conformance) did not know about at
the time it was compiled.
Zero out the entire witness table so default implementations can be
filled in appropriately.
Fixes rdar://problem/64295849.1 parent 16c9c00 commit 7d7a35e
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4537 | 4537 | | |
4538 | 4538 | | |
4539 | 4539 | | |
4540 | | - | |
4541 | | - | |
| 4540 | + | |
| 4541 | + | |
4542 | 4542 | | |
4543 | 4543 | | |
4544 | 4544 | | |
| |||
0 commit comments