Commit Graph

4 Commits

Author SHA1 Message Date
Alexis Laferrière
39c3fc01a8 [Serialization] Restrict loading all swiftmodules by compiler tag
Swiftmodule loading was previously restricted by compiler tag only for
resilient modules. This left room for resilient modules with a corrupted
control block to pass as non-resilient modules.

Apply the same check for non-resilient modules (so all modules) when
read from a tagged compiler.

rdar://88081456
2022-01-27 11:13:57 -08:00
Saleem Abdulrasool
f9f743e492 tests: enable Serialization test on Windows
Enable the Serialization/restrict-swiftmodule-to-revision on Windows.
This test was unnecessarily disabled on Windows due to the use of
environment variables which can be accommodated by using the `env`
command.
2021-12-22 08:42:54 -08:00
Alexis Laferrière
2203860b5a [Serialization] Disable test restrict-swiftmodule-to-revision on Windows 2021-09-22 16:00:03 -07:00
Alexis Laferrière
5c2122a08c [Serialization] Restrict resilient swiftmodules to the compiler that built them
Introduce a new loading restriction that is more strict than the serialization
version check on swiftmodules. Tagged compilers will only load
library-evolution enabled swiftmodules that are produced by a compiler with the
exact same revision id. This will be more reliable in production
environments than using the serialization version which we forgot to
update from time to time. This shouldn't affect development compilers that
will still load any module with a compatible serialization version.

rdar://83105234
2021-09-20 18:06:35 -07:00