From e7cb3ce8cde3df8068502535daf6fe7faf07328f Mon Sep 17 00:00:00 2001 From: Alex Groce Date: Thu, 6 Dec 2018 05:09:23 -0700 Subject: [PATCH] try immediate return for manticore --- src/include/deepstate/DeepState.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/include/deepstate/DeepState.h b/src/include/deepstate/DeepState.h index 11c4329..ed8ecf8 100644 --- a/src/include/deepstate/DeepState.h +++ b/src/include/deepstate/DeepState.h @@ -260,12 +260,13 @@ DEEPSTATE_INLINE static void DeepState_Check(int expr) { if (low > high) { \ return DeepState_ ## Tname ## InRange(high, low); \ } \ - tname x = DeepState_ ## Tname(); \ + const tname x = DeepState_ ## Tname(); \ if (DeepState_UsingSymExec) { \ (void) DeepState_Assume(low <= x && x <= high); \ + return x; } else if ((x < low) || (x > high)) { \ const tname size = (high - low) + 1; \ - x = low + (x % size); \ + return low + (x % size); \ } \ return x; \ }