[erlang-bugs] embedded pcre vs linked-in drivers

Paul Fisher <>
Thu Nov 6 15:20:08 CET 2008


We have run into an issue with the embedded pcre and linked-in drivers 
that use the libpcre.so.  Apparently the embedded version of pcre 
changes the size of the pcre_extra structure, uses those extra fields in 
pcre_exec.c AND continues to use the same pcre_xxxx function entry point 
names.  (All protected by ERLANG_INTEGRATION #define.)

When loaded the linked-in drivers bind to the pcre_xxxx functions 
provided by vm executable, and because the code of the linked-in driver 
was built with the system headers (without the extra fields in the 
pcre_extra structure) the pcre_xxxx functions proceed to step over 
storage that was not intended for them.

Corruption ensues.

I believe that one of two things needs to happen:
1) change pcre_xxxx entry points to erl_pcre_xxx (or something), 
therefore not conflicting with the system pcre linked-in drivers may 
depend on.
2) provided the functionality for these fields outside of the pcre_xxxx 
code in order to allow their use by linked-in drivers.


--
paul



More information about the erlang-bugs mailing list