@@ -50,15 +50,6 @@ LLVM_ATTRIBUTE_ALWAYS_INLINE
50
50
static void reportExclusivityConflict (ExclusivityFlags oldAction, void *oldPC,
51
51
ExclusivityFlags newFlags, void *newPC,
52
52
void *pointer) {
53
- static std::atomic<long > reportedConflicts{0 };
54
- constexpr long maxReportedConflicts = 100 ;
55
- // Don't report more that 100 conflicts. Hopefully, this will improve
56
- // performance in case there are conflicts inside a tight loop.
57
- if (reportedConflicts.fetch_add (1 , std::memory_order_relaxed) >=
58
- maxReportedConflicts) {
59
- return ;
60
- }
61
-
62
53
constexpr unsigned maxMessageLength = 100 ;
63
54
constexpr unsigned maxAccessDescriptionLength = 50 ;
64
55
char message[maxMessageLength];
@@ -87,9 +78,6 @@ static void reportExclusivityConflict(ExclusivityFlags oldAction, void *oldPC,
87
78
constexpr unsigned framesToSkip = 1 ;
88
79
printCurrentBacktrace (framesToSkip);
89
80
90
- // Should be inlined away in release builds.
91
- bool keepGoing = isWarningOnly (newFlags);
92
-
93
81
RuntimeErrorDetails::Thread secondaryThread = {
94
82
.description = oldAccess,
95
83
.numFrames = 1 ,
@@ -104,17 +92,7 @@ static void reportExclusivityConflict(ExclusivityFlags oldAction, void *oldPC,
104
92
.numExtraThreads = 1 ,
105
93
.threads = &secondaryThread
106
94
};
107
- uintptr_t flags = RuntimeErrorFlagNone;
108
- if (!keepGoing)
109
- flags = RuntimeErrorFlagFatal;
110
- _swift_reportToDebugger (flags, message, &details);
111
-
112
- if (keepGoing) {
113
- return ;
114
- }
115
-
116
- // 0 means no backtrace will be printed.
117
- fatalError (0 , " Fatal access conflict detected.\n " );
95
+ _swift_reportToDebugger (RuntimeErrorFlagFatal, message, &details);
118
96
}
119
97
120
98
namespace {
@@ -201,8 +179,8 @@ class AccessSet {
201
179
reportExclusivityConflict (cur->getAccessAction (), cur->PC ,
202
180
flags, pc, pointer);
203
181
204
- // If we're only warning, don't report multiple conflicts .
205
- break ;
182
+ // 0 means no backtrace will be printed .
183
+ fatalError ( 0 , " Fatal access conflict detected. \n " ) ;
206
184
}
207
185
if (!isTracking (flags))
208
186
return false ;
0 commit comments