Re: [pcre-dev] A test for the memory mismatch problem

Pàgina inicial
Delete this message
Autor: Sheri
Data:  
A: pcre-dev
Assumpte: Re: [pcre-dev] A test for the memory mismatch problem
Philip Hazel wrote:
> Sheri,
>
> Attached to this message is a testing version of pcretest.c. It outputs
> additional information about memory usage, in an attempt to track down
> why you are getting errors like:
>
> Size disagreement: pcre_fullinfo=62 call to malloc for 0
>
> When you have compiled this new pcretest, please run it with this single
> line of input:
>
> /(a)b|/I
>
> What I see when I do that is this:
>
> --------------------------------------------------------------------
> pcre_malloc set to 0x8048e30
> address of gotten_store is 0x8070580
> PCRE version 7.1-RC4 2007-03-29
>
> /(a)b|/I
> gotten_store (0x8070580) set to 62
> malloc        62 0x8095c30
> address of gotten_store is 0x8070580
> regex_gotten_store = 62
> Capturing subpattern count = 1
> No options
> No first char
> No need char
> --------------------------------------------------------------------

>
> Don't worry about the PCRE version or the exact hex values. What I'm
> interested in is whether the form of the output is the same, and those
> 62s. I expect they will turn into zeros at some point - which is what
> gives rise to the size disagreement error. (That test line is the first
> line of testinput2, which provoked the error in the output you sent me.)
>
>
>

Hi Philip,

The attachment was in the list message when I got it.

I fooled around with my RC3 dir so much in the last few days, I decided
to rebuild from scratch, and just substituted your new source for pcretest.

Here is what I get with your test:

================================================

pcre_malloc set to 00401AF0
address of gotten_store is 0040C0D0
PCRE version 7.1-RC3 2007-03-26

re> /(a)b|/I

address of gotten_store is 0040C0D0
regex_gotten_store = 0
Size disagreement: pcre_fullinfo=62 call to malloc for 0
Capturing subpattern count = 1
No options
No first char
No need char
===========================================

Hope it helps.

Regards,
Sheri