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

Kezdőlap
Üzenet törlése
Szerző: Philip Hazel
Dátum:  
Címzett: Sheri
CC: pcre-dev
Régi témák: Re: [pcre-dev] Here is pcre-7.1-RC2 for you to play with
Tárgy: [pcre-dev] A test for the memory mismatch problem
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.)

Philip

--
Philip Hazel, University of Cambridge Computing Service.