bugfix for backtracking over RET insns, and a truly evil testcase

This commit is contained in:
Stephen Dolan committed 2012-08-22 19:05:53 +01:00
1 parent 79d81f4bee
commit 2086e59ab1
10 files changed
+83 -53

No files matched your search

+5 -1
View File
@@ -76,7 +76,11 @@ static void* forkable_stack_peek(struct forkable_stack* s) {
static void* forkable_stack_peek_next(struct forkable_stack* s, void* top) {
forkable_stack_check(s);
struct forkable_stack_header* elem = top;
return (void*)(s->stk + elem->next);
if (elem->next < s->length) {
return (void*)(s->stk + elem->next);
} else {
return 0;
}
}
static void forkable_stack_pop(struct forkable_stack* s) {