[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
cex: fix a crash
From: |
Akim Demaille |
Subject: |
cex: fix a crash |
Date: |
Sat, 16 May 2020 15:31:26 +0200 |
Unfortunately, this does not fix the crash of test 247, it's unrelated.
commit f3bc4dc154456ecbf0aa7f65c61fbfe25c646452
Author: Akim Demaille <address@hidden>
Date: Sat May 16 15:21:59 2020 +0200
cex: fix a crash
* src/state-item.c (init_state_items): If the rule has no reductions
at all, don't read at all in its list of reduced rules.
diff --git a/src/state-item.c b/src/state-item.c
index a428c875..167e9ac1 100644
--- a/src/state-item.c
+++ b/src/state-item.c
@@ -150,7 +150,7 @@ init_state_items (void)
state_item_set (sidx, s, s->items[j]);
state_item *si = state_items + sidx;
const rule *r = item_rule (si->item);
- if (red->rules[rule_search_idx] < r)
+ if (rule_search_idx < red->num && red->rules[rule_search_idx] < r)
++rule_search_idx;
if (rule_search_idx < red->num && r == red->rules[rule_search_idx])
{
- [PATCH 4/5] counterexample generation integration, (continued)
- [PATCH 4/5] counterexample generation integration, Vincent Imbimbo, 2020/05/12
- [PATCH 5/5] counterexample test suite, Vincent Imbimbo, 2020/05/12
- Re: [PATCH 0/5] Conflict Counterexample Generation, Akim Demaille, 2020/05/13
- Re: [PATCH 0/5] Conflict Counterexample Generation, Vincent Imbimbo, 2020/05/13
- Re: [PATCH 0/5] Conflict Counterexample Generation, Akim Demaille, 2020/05/13
- Re: [PATCH 0/5] Conflict Counterexample Generation, Akim Demaille, 2020/05/13
- Re: [PATCH 0/5] Conflict Counterexample Generation, Akim Demaille, 2020/05/14
- Re: [PATCH 0/5] Conflict Counterexample Generation, Akim Demaille, 2020/05/16
- cex: isolate missing API from gl_list, Akim Demaille, 2020/05/16
- cex: stylistic changes, Akim Demaille, 2020/05/16
- cex: fix a crash,
Akim Demaille <=
- cex: style changes in state-item, Akim Demaille, 2020/05/16
- cex: avoid uninitialized variables, Akim Demaille, 2020/05/16