When there are multiple overlapping trailing contexts, re2c-generated code may set incorrect YYCTXMARKER value. The following example fails on input string that matches pattern "abb" [^c]: rule 1 matches and should consume single character a, but it consumes ab because YYCTXMARKER gets overwritten when trying to match rule 0.
This is because re2c tries to implement variable-length trailing contexts using single pointer (YYCTXMARKER). Initially re2c supported only fixed-length trailing contexts, but this was changed by commit 9c2ee72734b2965a16d88d93a9fe14b7dd2dc6e3: "- Applied #1411087 variable length trailing context.".
Of all re2c tests, only very few are affected (re2c own lexer and one of example lexers).
The problem can be fixed by adding multiple pointers (one pointer per rule) and setting YYCTXMARKER to the right value in the end. Should be simple.
Fixed in devel: main fix is by commit 7db4bab (added multiple context markers for overlapping trailing contexts), another important change is by commit 5958a23 (bind tags to DFA transitions, not states).