Rose: add handling for unexpected programs

This commit is contained in:
Wang, Xiang W
2019-03-25 12:30:07 -04:00
committed by Wang Xiang W
parent f0bde3721e
commit 6dc9bed310
4 changed files with 63 additions and 9 deletions

View File

@@ -2771,6 +2771,12 @@ hwlmcb_rv_t roseRunProgram(const struct RoseEngine *t,
work_done = 1;
}
PROGRAM_NEXT_INSTRUCTION
default: {
assert(0); // unreachable
scratch->core_info.status |= STATUS_ERROR;
return HWLM_TERMINATE_MATCHING;
}
}
}
@@ -3053,6 +3059,8 @@ hwlmcb_rv_t roseRunProgram_l(const struct RoseEngine *t,
default: {
assert(0); // unreachable
scratch->core_info.status |= STATUS_ERROR;
return HWLM_TERMINATE_MATCHING;
}
}
}