Skip to content

Commit 09b06a8

Browse files
committed
Revert "[Serialization] Enable deserialization safety by default"
This reverts commit af70cc5. # Conflicts: # test/Serialization/Safety/unsafe-decls.swift
1 parent a7e7007 commit 09b06a8

File tree

6 files changed

+17
-7
lines changed

6 files changed

+17
-7
lines changed

include/swift/Basic/LangOptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ namespace swift {
366366

367367
/// Enable early skipping deserialization of decls that are marked as
368368
/// unsafe to read.
369-
bool EnableDeserializationSafety = true;
369+
bool EnableDeserializationSafety = false;
370370

371371
/// Whether to enable the new operator decl and precedencegroup lookup
372372
/// behavior. This is a staging flag, and will be removed in the future.

test/Serialization/Safety/override-internal-func.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@
1010
// RUN: -emit-module-interface-path %t/Lib.swiftinterface
1111

1212
/// Build against the swiftmodule.
13-
// RUN: %target-swift-frontend -typecheck %t/Client.swift -I %t
13+
// RUN: %target-swift-frontend -typecheck %t/Client.swift -I %t \
14+
// RUN: -enable-deserialization-safety
1415

1516
/// Build against the swiftinterface.
1617
// RUN: rm %t/Lib.swiftmodule
17-
// RUN: %target-swift-frontend -typecheck %t/Client.swift -I %t
18+
// RUN: %target-swift-frontend -typecheck %t/Client.swift -I %t \
19+
// RUN: -enable-deserialization-safety
1820

1921
//--- Lib.swift
2022

test/Serialization/Safety/skip-reading-internal-anyobject.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111

1212
/// Build client.
1313
// RUN: %target-swift-frontend -typecheck %t/Client.swift -I %t \
14-
// RUN: -verify -Xllvm -debug-only=Serialization 2>&1 \
14+
// RUN: -verify -Xllvm -debug-only=Serialization \
15+
// RUN: -enable-deserialization-safety 2>&1 \
1516
// RUN: | %FileCheck --check-prefixes=SAFE %s
1617

1718
/// Decls skips by the deserialization safety logic.

test/Serialization/Safety/skip-reading-internal-details.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
// RUN: | %FileCheck --check-prefixes=NEEDED,UNSAFE %s
2020

2121
// RUN: %target-swift-frontend -typecheck %t/Client.swift -I %t \
22-
// RUN: -verify -Xllvm -debug-only=Serialization 2>&1 \
22+
// RUN: -verify -Xllvm -debug-only=Serialization \
23+
// RUN: -enable-deserialization-safety 2>&1 \
2324
// RUN: | %FileCheck --check-prefixes=NEEDED,CLEAN,SAFE %s
2425

2526
/// Build against the swiftinterface.

test/Serialization/Safety/unsafe-decls.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,28 @@
44

55
// RUN: %target-swift-frontend -emit-module %s \
66
// RUN: -enable-library-evolution -swift-version 5 \
7+
// RUN: -enable-deserialization-safety \
78
// RUN: -Xllvm -debug-only=Serialization 2>&1 | %swift-demangle --simplified \
89
// RUN: | %FileCheck --check-prefixes=SAFETY-PRIVATE,SAFETY-INTERNAL %s
910

1011
// RUN: %target-swift-frontend -emit-module %s \
1112
// RUN: -enable-library-evolution -swift-version 5 \
13+
// RUN: -enable-deserialization-safety \
1214
// RUN: -Xllvm -debug-only=Serialization \
1315
// RUN: -enable-testing 2>&1 \
1416
// RUN: | %FileCheck --check-prefixes=DISABLED %s
1517

1618
/// Don't mark decls as unsafe when private import is enabled.
1719
// RUN: %target-swift-frontend -emit-module %s \
1820
// RUN: -enable-library-evolution -swift-version 5 \
21+
// RUN: -enable-deserialization-safety \
1922
// RUN: -Xllvm -debug-only=Serialization \
2023
// RUN: -enable-private-imports 2>&1 \
2124
// RUN: | %FileCheck --check-prefixes=DISABLED %s
2225

2326
/// Don't mark decls as unsafe without library evolution.
2427
// RUN: %target-swift-frontend -emit-module %s \
25-
// RUN: -swift-version 5 \
28+
// RUN: -enable-deserialization-safety -swift-version 5 \
2629
// RUN: -Xllvm -debug-only=Serialization 2>&1 \
2730
// RUN: | %FileCheck --check-prefixes=DISABLED %s
2831

test/Serialization/Safety/unsafe-extensions.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,28 @@
44

55
// RUN: %target-swift-frontend -emit-module %s \
66
// RUN: -enable-library-evolution -swift-version 5 \
7+
// RUN: -enable-deserialization-safety \
78
// RUN: -Xllvm -debug-only=Serialization 2>&1 \
89
// RUN: | %FileCheck --check-prefixes=SAFETY-PRIVATE,SAFETY-INTERNAL %s
910

1011
// RUN: %target-swift-frontend -emit-module %s \
1112
// RUN: -enable-library-evolution -swift-version 5 \
13+
// RUN: -enable-deserialization-safety \
1214
// RUN: -Xllvm -debug-only=Serialization \
1315
// RUN: -enable-testing 2>&1 \
1416
// RUN: | %FileCheck --check-prefixes=DISABLED %s
1517

1618
/// Don't mark decls as unsafe when private import is enabled.
1719
// RUN: %target-swift-frontend -emit-module %s \
1820
// RUN: -enable-library-evolution -swift-version 5 \
21+
// RUN: -enable-deserialization-safety \
1922
// RUN: -Xllvm -debug-only=Serialization \
2023
// RUN: -enable-private-imports 2>&1 \
2124
// RUN: | %FileCheck --check-prefixes=DISABLED %s
2225

2326
/// Don't mark decls as unsafe without library evolution.
2427
// RUN: %target-swift-frontend -emit-module %s \
25-
// RUN: -swift-version 5 \
28+
// RUN: -enable-deserialization-safety -swift-version 5 \
2629
// RUN: -Xllvm -debug-only=Serialization 2>&1 \
2730
// RUN: | %FileCheck --check-prefixes=DISABLED %s
2831

0 commit comments

Comments
 (0)