Commit Graph

5 Commits

Author SHA1 Message Date
Nate Chandler
c3c088e64b [Test] Reenabled two tests without back deploy.
rdar://61345988
2021-05-20 17:08:55 -07:00
Nate Chandler
b052210716 [Runtime] Disable some tests on swift on os bots.
Delete a comment that precedes an UNSUPPORTED line.

rdar://problem/61814353
2020-04-15 09:30:56 -07:00
Nate Chandler
ab2d3e84ad Disabled tests failing from missing objc symbol.
Two tests are currently failing with

dyld: lazy symbol binding failed: Symbol not found: _objc_opt_self
  Expected in: /usr/lib/libobjc.A.dylib

dyld: Symbol not found: _objc_opt_self
  Expected in: /usr/lib/libobjc.A.dylib

Here, they are disabled for now.

rdar://problem/61345988
2020-04-06 11:12:11 -07:00
Xi Ge
aa39afa32a test: disable Runtime/superclass_constraint_metadata_resilient_superclass_future.swift
rdar://61345988
2020-04-06 09:48:49 -07:00
Nate Chandler
2863f1964d [Runtime] Handle incomplete class metadata in _checkGenericRequirements.
When constructing the metadata for a type Gen<T : Super>
where Super is a superclass constraint, the generic argument K at which
the metadata for Gen is being instantiated is verified to be a subclass
of Super via _checkGenericRequirements.

Previously, that check was done using swift_dynamicCastMetatype.  That
worked for the most part but provided an incorrect answer if the
metadata for K was not yet complete.  These classes are incomplete more
often thanks to __swift_instantiateConcreteTypeFromMangledNameAbstract.

That issue occurred concretely in the following case:

  Framework with Library Evolution enabled:

    open class Super { ... }
    public struct Gen<T : Super> {
    }

  Target in a different resilience domain from that framework:

    class Sub : Super {
      var gen: Gen<Sub>?
    }

Here, the mechanism for checking whether the generic argument K at which
the metadata for Gen is being instantiated handles the case where K's
metadata is incomplete.  At worst, every superclass name from super(K)
up to Super are demangled to instantiate metadata.  A number of faster
paths are included as well.

rdar://problem/60790020
2020-04-03 13:28:54 -07:00