From e799ec083ee25b6ec6621bfa95f36d77c6be6c8e Mon Sep 17 00:00:00 2001
From: Yifan Zhao <yifanz16@illinois.edu>
Date: Tue, 27 Apr 2021 14:57:02 -0500
Subject: [PATCH] Fixed an out-of-bound bug

---
 predtuner/pipedbin.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/predtuner/pipedbin.py b/predtuner/pipedbin.py
index 4cdfe71..17ae270 100644
--- a/predtuner/pipedbin.py
+++ b/predtuner/pipedbin.py
@@ -339,7 +339,7 @@ class HPVMConfigBuilder:
         merged_to_original = []
         while lhs < len(types):
             widx = 0
-            while widx < len(mm) and types[rhs] in mm[widx]:
+            while widx < len(mm) and rhs < len(types) and types[rhs] in mm[widx]:
                 rhs += 1
                 widx = rhs - lhs
             if rhs == lhs:
-- 
GitLab