Euphoria Ticket #113: error in be_pcre.c

Ok, so I fixed this problem, but I'm too cautious (read: scared) to upload files on my own.

In the newest build (2973) the regular expression functions aren't working. I tracked it down to line 205 of be_pcre.c which reads:

 
ovector_size = get_int( SEQ_PTR(x)->base[5] ); 
 

but we aren't sending five values from regex.e:find. I believe the line is suppose to read:

 
ovector_size = get_ovector_size(x); 
 

using the get_ovector_size function recently added for that purpose.

Testing on my machine shows that the regex functions work properly after a rebuild. If someone would double check that changing that line won't ruin the whole project, I'd appreciate it.

Damien Black

Details

Type: Bug Report Severity: Major Category: Library Routine
Assigned To: unknown Status: Invalid Reported Release: 2973
Fixed in SVN #: View VCS: none Milestone:

1. Comment by jimcbrown Oct 30, 2009

We should be getting the 5 values from find(). Are you sure you are using the right version of std/regex.e ? Look around line 279 of include/std/regex.e, it should look like this:

public function find(regex re, sequence haystack, integer from=1, object options=DEFAULT, integer size=get_ovector_size(re, 90)) 
        if sequence(options) then options = or_all(options) end if 
        return machine_func(M_PCRE_EXEC, { re, haystack, options, from, size }) 
end function 

2. Comment by jimcbrown Oct 30, 2009

I think you may be accidently using an older version of regex.e with the newer binary.

3. Comment by DamienRoseBlack Oct 30, 2009

That is odd, I do seem to have an older version of regex.e, but I pulled it straight out of the eubin: eubins-2907:2972-20091030.tgz, and TortoiseSVN says it is updated... am I doing something wrong?

4. Comment by DamienRoseBlack Oct 30, 2009

Ah, I got it... apparently those little green checks aren't a guarantee of being up to date... but why did the eubin have an older version in it?

5. Comment by jimcbrown Oct 30, 2009

eubins should not have the older version, but it does. This is a bug in eubins that needs to be fixed. getlost

6. Comment by DamienRoseBlack Oct 30, 2009

Ok, thanks... sorry false alarm... well at least I got to play around with the files and get them to do things, that was fun. :)

7. Comment by jimcbrown Oct 30, 2009

No problem, after all you did find a genuine bug.

Search



Quick Links

User menu

Not signed in.

Misc Menu