This is with mawk 1.3.4 20231126. Here is a fix. The problem occurs only with 2**31 or more repetitions so this is only a theoretical bug.
--- rexp.c.~1~ 2023-07-30 13:48:27.000000000 -0700
+++ rexp.c 2023-12-09 14:38:26.102323420 -0800
@@ -235,7 +235,7 @@
TRACE(("RE_lex token %s\n", token_name(T_PLUS)));
#endif
} else { /* n or more */
- register int i;
+ register Int i;
/* copy 2 copies of m_ptr, use 2nd copy to replace
the first copy that gets swallowed by concat */
MACHINE *result_mp = m_ptr;
This is with mawk 1.3.4 20231126. Here is a fix. The problem occurs only with 2**31 or more repetitions so this is only a theoretical bug.