Check for global variable deref cycles in the verifier.

This commit is contained in:
Jakob Stoklund Olesen
2017-08-17 15:11:35 -07:00
parent bf4ae3bb2e
commit 5566c99dba
3 changed files with 50 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
test verifier
function %deref_cycle() {
gv1 = deref(gv2)-32 ; error: deref cycle: [gv0, gv1]
gv2 = deref(gv1)
ebb1:
return
}
function %self_cycle() {
gv0 = deref(gv0)-32 ; error: deref cycle: [gv0]
ebb1:
return
}