Re: [pcre-dev] Here is pcre-7.1-RC2 for you to play with

Top Page
Delete this message
Author: Sheri
Date:  
To: pcre-dev
Subject: Re: [pcre-dev] Here is pcre-7.1-RC2 for you to play with
Philip Hazel wrote:
> On Tue, 20 Mar 2007, Sheri wrote:
>
>
>> in test 2 there are numerous individual tests report "size disagreement".
>>
>> e.g.,
>> Size disagreement: pcre_fullinfo=62 call to malloc for 0
>>
>> also some differences in "Memory allocation (code space)"
>>
>
> These are all the same. There is a static variable called "gotten_store"
> in pcretest, which is set when PCRE calls the private function
> new_malloc() to get memory. This static is used when generating those
> messages - it seems incorrectly to be zero in your case. (The 0 in the
> message above should be 62.)
>
> Either: for some reason PCRE isn't calling pcretest's malloc function,
> or the static variable isn't getting set correctly. This smacks of some
> kind of linkage problem or variable scope problem, but I haven't any
> idea as to what to suggest. Someone with Windows programming experience
> is needed to figure out what is going on (and if anything can be done to
> get rid of those errors).
>
>
>> test 7
>>
>> 3 tests report "No Match" (all using callouts)
>>
>
> Hmm. Callouts are another case where the address of a function is passed
> around.
>
>
>> Below is my configure command, which I followed immediated by "make":
>>
>> CFLAGS='-O3 -s' ./configure --enable-utf8 --enable-newline-is-any
>> --enable-unicode-properties --disable-stack-for-recursion
>> --disable-static --disable-cpp
>>
>
> I wonder if the --disable-stack-for-recursion might be influencing the
> malloc things? Have you tried without that?
>
>
>

Hi Philip,

No, but have you tried compiling with it? We disable stack recursion
because otherwise, when pcre needs more stack space than allocated in
the library, the program crashes. Prior to adopting the no-stack
approach, some of the tests in pcretest crashed.

Never saw these size allocation errors in pcretest results with 7.0. In
pcre 7.0, I was able to produce dll libraries with configure followed by
make (in Msys/MinGW), but it failed to produce pcretest.exe. This is how
I used to produce pcretest.exe:

$ cd .libs
$ gcc -L./ -o pcretest.exe ../pcretest.o -lpcre

Native and posix functions were all in pcre.dll (a separate
pcreposix.dll file was also produced by 7.0's configure/make but not used).

Apparently until the Cmake process is ready, my ability to test is going
to be sorely limited. I tried replacing the c source files in a fresh
pcre-7.0 dir with the ones from pcre-7.1RC2 to see if I could build
pcre.dll and pcretest.exe the way I used to, but it didn't work.

BTW, you might want to tell that person writing to the web site to look
at the sample program and the google programs.

Regards,
Sheri
(Windows, but non-programmer)