In Yap 5.11:
?- use_module(library(regexp)).
% reconsulting /usr/share/Yap/regexp.yap...
% reconsulted /usr/share/Yap/regexp.yap in module regexp, 0 msec 4096 bytes
yes
?- regexp("^(.+(a))\\2$", "krowaa", [], [_, X, _]).
X = [107,114,111,119,97] ?
yes
?- regexp("^(.+(a))\\2$", "krowaa", [], [_, X]).
yap: regexec.c:1372: pop_fail_stack: Assertion `num >= 0' failed.
Aborted (core dumped)
I would rather expect that the predicate to fail instead of core dumping.
Logged In: YES
user_id=6266
Originator: NO
Sorry for the long delay, I didn't use to track this.
It looks like this is a problem with the regular expression that causes regexc to crash. regcomp should fail but it doesn't.