Possible bug in pcre.c

Roberto Cornacchia roberto.cornacchia at gmail.com
Mon Apr 8 15:27:02 CEST 2019


Hi,

I was looking at this piece of code (end of pcrejoin loop), and I have the
feeling something isn't right.
Inside the body of
  if (nl == 0)
a condition over lastl is checked.

However, it seems to me that lastl gets a useful value only when nl > 0.
If (nl == 0) then lastl must be 0.


<loop> {
                        /* actual body */
                        ....


                        /* track result properties */
if (BATcount(r1) > 0) {
if (lastl + 1 != lo)
r1->tseqbase = oid_nil;
if (nl == 0) {
r2->trevsorted = 0;
if (lastl > lo) {
r1->tsorted = 0;
r1->tkey = 0;
} else if (lastl < lo) {
r1->trevsorted = 0;
} else {
r1->tkey = 0;
}
}
}
APPEND(r1, lo);
APPEND(r2, ro);
lastl = lo;
nl++;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.monetdb.org/pipermail/developers-list/attachments/20190408/3fc74f5f/attachment.html>


More information about the developers-list mailing list