summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Shaz Qadeer <qadeer@microsoft.com>2015-09-02 20:14:00 -0700
committerGravatar Shaz Qadeer <qadeer@microsoft.com>2015-09-02 20:14:00 -0700
commitff02bddd8982e92d623b0342e7b079edfaa9b366 (patch)
tree75c561aeff75fbae9f5bc08b58698da6bd1f54c8
parent35332e25e899424ee1714eea8d451c79563154aa (diff)
fixed a crash when there is no collector
-rw-r--r--Source/Concurrency/LinearSets.cs2
-rw-r--r--Test/civl/nocollector.bpl8
-rw-r--r--Test/civl/nocollector.bpl.expect2
3 files changed, 12 insertions, 0 deletions
diff --git a/Source/Concurrency/LinearSets.cs b/Source/Concurrency/LinearSets.cs
index 0fa04b1b..f086dd84 100644
--- a/Source/Concurrency/LinearSets.cs
+++ b/Source/Concurrency/LinearSets.cs
@@ -624,12 +624,14 @@ namespace Microsoft.Boogie
foreach (Variable v in AvailableLinearVars(absy))
{
var domainName = FindDomainName(v);
+ if (!linearDomains.ContainsKey(domainName)) continue;
domainNameToScope[domainName].Add(v);
}
foreach (Variable v in program.GlobalVariables)
{
var domainName = FindDomainName(v);
if (domainName == null) continue;
+ if (!linearDomains.ContainsKey(domainName)) continue;
domainNameToScope[domainName].Add(v);
}
foreach (string domainName in linearDomains.Keys)
diff --git a/Test/civl/nocollector.bpl b/Test/civl/nocollector.bpl
new file mode 100644
index 00000000..5a6f1e5d
--- /dev/null
+++ b/Test/civl/nocollector.bpl
@@ -0,0 +1,8 @@
+// RUN: %boogie -noinfer -useArrayTheory "%s" > "%t"
+// RUN: %diff "%s.expect" "%t"
+var {:linear "L"} x:int;
+
+procedure{:yields}{:layer 1} P()
+{
+ yield;
+}
diff --git a/Test/civl/nocollector.bpl.expect b/Test/civl/nocollector.bpl.expect
new file mode 100644
index 00000000..37fad75c
--- /dev/null
+++ b/Test/civl/nocollector.bpl.expect
@@ -0,0 +1,2 @@
+
+Boogie program verifier finished with 1 verified, 0 errors