Commit Graph

2 Commits

Author SHA1 Message Date
Slava Pestov
9c6cd08a9b IRGen: Fix lowering of alloc_ref for resilient classes
We were inlining the size and alignment, which was not correct.
This was the cause of a long-standing ASAN failure in some
library evolution tests.

Fixes <rdar://problem/24540778>.
2017-09-15 00:24:52 -07:00
Slava Pestov
8de76da8e9 Add library evolution test for part of vtable resilience
Subclasses of resilient and generic classes now dynamically initialize
the vtable by copying the vtable from the superclass, and filling in
method overrides.

This means we no longer emit references to the base class's methods
statically, which allows the base class to add or remove an overload
resiliently without invalidating vtables of subclasses already
compiled.

Note that we still don't know how to slide subclass metadata when
the size of superclass metadata changes, so we can't resiliently
add or remove vtable entries yet.
2017-08-24 19:15:43 -07:00