Regexp datablade problem
Posted in 2006
This looks like a very useful tool, but I can't get the darn thing
working against IDS 10.0.FC4 on AIX 5.3.
The first problem I had was compiling errors related to strchr -
apparently on AIX the compiler wants to use a macro for strchr, so the
declaration "extern char *strchr();" caused the compiler to produce
this:
"c/regexp.c", line 715.29: 1506-041 (E) The invocation of macro strchr
contains fewer arguments than required by the macro definition.
"c/regexp.c", line 715.22: 1506-275 (S) Unexpected text ',' encountered.
I couldn't find much about this, but given that the compiler is using
macros I figured I could comment out the declaration. If I do that it
will compile and link without errors.
I then copy the files around, create the new VPCLASS and register the
blade in my test database as per the instructions. All of these things
work without errors as well. Unfortunately when I try to use the
regexp_match(lvarchar, lvarchar) function the engine crashes with an
assertion failure (no exception handler). I turned tracing on and it
looks like the regexp function is returning successfully - the trace
message immediately before the return executes, and even indicates that
it has the correct return value. According to the AF file the thread
causing the problem is my sqlexec thread, executing in the 0th cpu vp. I
don't see much else of use in there.
I started playing around with the code a little to see if I could
prevent this by returning before it called various things. It looks like
if the code gets into the regcomp function (in regexp.c) it dies, even
if I return immediately after the variable declarations in that
function.
As a note, I also tried compiling this with gcc. If I do that the engine
crashes with a number of these:
rtld: 0712-001 Symbol memcpy was referenced
from module /usr/informix/extend/regexp.1.0/regexp.bld(), but a
runtime definition
of the symbol was not found.
Then I tried compiling with the -bstatic flag, and got something new:
14:52:32 Fatal error in ADM VP at mt.c:12516
14:52:32 Unexpected virtual processor termination, pid = 209262, exit =0x100
I'm pretty much out of ideas, but this would be such a handy tool I'm
hoping someone has a solution. Thanks.
DC