From 97483eee5bb997e85815e3b61e465012e09e37dd Mon Sep 17 00:00:00 2001 From: Alex Coyte Date: Wed, 31 Aug 2016 10:50:46 +1000 Subject: [PATCH] UE-3019: limex_compile: correctly access the dominator map --- src/nfa/limex_compile.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nfa/limex_compile.cpp b/src/nfa/limex_compile.cpp index 07e1ed5f..78b9729f 100644 --- a/src/nfa/limex_compile.cpp +++ b/src/nfa/limex_compile.cpp @@ -762,8 +762,9 @@ u32 getEffectiveAccelStates(const build_info &args, * prevent .* 'truly' dominating */ for (u32 local_accel_mask = active_accel_mask; local_accel_mask; ) { u32 accel_id = findAndClearLSB_32(&local_accel_mask); + assert(accel_id < accelStates.size()); NFAVertex v = accelStates[accel_id].v; - while (contains(dom_map, v)) { + while (dom_map[v]) { v = dom_map[v]; if (contains(accel_id_map, v)) { dominated_by[accel_id] |= 1U << accel_id_map[v];