Commit Graph

6 Commits

Author SHA1 Message Date
Alexis Laferrière
a5ccbf3264 [Serialization] Only remark if the last digit mismatches in precise tag check
Weaken the precise tag check at loading swiftmodule to accept binary
modules build by a compiler with a tag where only the last digit is
different. We assume that the other digit in the version should ensure
compiler and stdlib compatibility. If the last digit doesn't match,
still raise a remark.

rdar://105158258
2023-02-13 14:28:10 -08:00
Alexis Laferrière
e079db233f [Serialization] Update env var to disable precise tag check
Rename the env var to SWIFT_IGNORE_SWIFTMODULE_REVISION as it's
recommended for use outside of testing.
2023-02-13 13:51:30 -08:00
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