Commit Graph

12 Commits

Author SHA1 Message Date
Andrew Trick
3810b0cae9 Add runtime tests for dynamic exclusivity enforcement. 2017-06-20 00:01:52 -07:00
Kuba (Brecka) Mracek
a5a59f5aed [runtime] Enhance output from dynamic exclusivity violations. Print current stacktrace and the symbolicated frame of the previous conflicting access. (#9501) 2017-05-12 20:28:28 -07:00
John McCall
701752c4ff Merge pull request #9431 from rjmccall/dynamic-exclusivity-refinements
Dynamic exclusivity refinements
2017-05-11 02:31:03 -04:00
Andrew Trick
c76269ccd9 Comment typos. 2017-05-10 16:37:59 -07:00
John McCall
93243e5f69 Fix expected test output. 2017-05-10 14:47:39 -04:00
John McCall
ab250848b4 Downgrade dynamic exclusivity failures to a warning in Swift 3 compatibility mode. 2017-05-10 14:44:59 -04:00
practicalswift
8c40c65c80 [gardening] Fix typos. 2017-05-09 21:50:04 +02:00
Andrew Trick
dd31c40995 [Exclusivity] Disable dynamic enforcement in noescape closures. 2017-05-08 17:27:26 -07:00
Devin Coughlin
de9c646804 [Exclusivity] Use dynamic enforcement on boxes whose projections escape
In AccessEnforcementSelection, treat passing a projection from a box to
a partial_apply as an escape to force using dynamic enforcement on the box.

This will now correctly use dynamic enforcement on variables that are taken
as inout and also captured by storage address in a closure:

  var x = ...

  x.mutatingMethod { ... use x ...}

but does pessimize some of our existing enforcement into dynamic since
access enforcement selection.

Ideally we would distinguish between escaping via an nonescaping closures
(which can only conflict with accesses that are in progress) and
escaping via escaping closures (which can conflict for any reachable code
after the escape)
2017-05-02 14:54:12 -07:00
Andrew Trick
45967ceb4f [Exclusivity] Update tests for access markers. 2017-04-28 21:33:09 -07:00
Devin Coughlin
a85aedebd4 [Exclusivity] Add test for per-thread dynamic enforcement.
We intentionally do not trap on conflicting accesses from different threads.

This is a test-only change.
2017-04-28 08:28:56 -07:00
Devin Coughlin
73aabd73f7 [Exclusivity] Fix insertion/remove in AccessSet in runtime.
And add some basic tests for trapping on accesses to globals.
2017-04-27 15:38:07 -07:00