···27642764 if (type != RE_EXEC_STATE_LOOKAHEAD)
27652765 break;
27662766 }
27672767+ if (lre_poll_timeout(s))
27682768+ return LRE_RET_TIMEOUT;
27672769 break;
27682770 case REOP_lookahead_match:
27692771 /* pop all the saved states until reaching the start of
···28662868 case REOP_negative_lookahead:
28672869 val = get_u32(pc);
28682870 pc += 4;
28692869- if (opcode == REOP_lookahead && bp != s->stack_buf && 0) {
28702870- int i;
28712871- /* save all the capture state so that they can be
28722872- restored in case of failure after the lookahead
28732873- matches */
28742874- idx = 4 * s->capture_count;
28752875- CHECK_STACK_SPACE(idx);
28762876- for(i = 0; i < 2 * s->capture_count; i++) {
28772877- sp[0].val = i;
28782878- sp[1].ptr = capture[i];
28792879- sp += 2;
28802880- }
28812881- }
28822871 CHECK_STACK_SPACE(3);
28832872 sp[0].ptr = (uint8_t *)(pc + (int)val);
28842873 sp[1].ptr = (uint8_t *)cptr;