I don't understand the gdb output you've attached. Are you running
through the program with "next"? Or did you just run a single
"backtrace"? I don't see any gdb instructions being given at all, so
I'm at a loss what to make of it all.
But figuring out what I can, it looks like the RE object is getting
constructed correctly, and FullMatch is being called at the time of
the crash. I base this on the fact that the stringpiece constructor
is begin called with an argument of "hello". So everything seems fine
up until then.
Then the next thing after the stringpiece is constructed that says
"hello", is the SIGILL. But we don't really have any good idea where
in the code that's happening.
I think you need to re-do this exercise with optimization turned off.
The easiest way is to run
make distclean
./configure CFLAGS=-g CXXFLAGS=-g
make
First, see if you still get the crash even with optimization turned
off. If you do, try generating the backtrace again (and by all means,
include all printf output -- it's very helpful!) Sorry for the extra
work, but I think the optimizer may be optimizing away the problem
code here.