Skip to content
Tcl Source Code History Of Ticket 505048ffffffffff
Login

History Of Ticket 505048ffffffffff

Artifacts Associated With Ticket 505048ffffffffff

  1. Ticket change [c4b9dc91d8] (rid 111885) by dgp on 2002-01-17 19:56:27:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      
      % regexp {\A\s*[^<]*\s*<([^>]+)>} "Newsletter
      Subscriber <[email protected]>" all mail
      error while matching regular expression: "can't happen"
      -- you found a bug
      
      
    4. foundin initialized to: "obsolete: 8.4a4"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "dgp"
    9. subsystem initialized to: "43. Regexp"
    10. title initialized to: "impossible occurs!"
    11. type initialized to: "Bug"
  2. Ticket change [624ad9c8ae] (rid 92391) by dgp on 2002-01-18 03:01:40:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      Simpler case:
      
      % regexp {\A\s*[^<]*\s*<([^>]+)>} "a <a>" all mail
      error while matching regular expression: "can't happen" --
      you found a bug
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  3. Ticket change [2ca35a7b5e] (rid 118938) by dgp on 2002-01-18 03:03:35:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      simpler still:
      
      % regexp {\A\s*[^<]*\s*<([^>]+)>} a<a> all mail
      error while matching regular expression: "can't happen" --
      you found a bug
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Ticket change [951616bc7a] (rid 106102) by dgp on 2002-01-18 03:16:41:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      yet simpler variations:
      
      
      % regexp {\A\s*([^b]*)b} ab all mail
      error while matching regular expression: "can't happen" --
      you found a bug
      
      % regexp {\A\s*[^b]*(b)} ab all mail
      error while matching regular expression: "can't happen" --
      you found a bug
      
      % regexp {\A(\s*)[^b]*(b)} ab all mail
      error while matching regular expression: "can't happen" --
      you found a bug
      
      Location of the capturing parens doesn't seem to matter
      as long as they are there.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  5. Ticket change [ce40396ab5] (rid 96020) by dgp on 2002-01-18 04:11:16:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      A comment from Helmut Giese in c.l.t leads to:
      
      % regexp {\A\s*[^b]*b} ab all           
      1
      % set all
       
      %
      
      Although no "can't happen" error, one would
      expect $all to be ab, but it's not.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  6. Ticket change [80ac967195] (rid 116906) by dkf on 2002-01-18 16:20:31:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      Eep!  Nasty, nasty, nasty...
      
        % regexp -inline {\A\s*[^b]*b} ab
        `h
        % regexp -indices -inline {\A\s*[^b]*b} ab
        {3 -139006}
      
      The first made me go "Eh?" and the second makes me want to
      hide, because it indicates that something is seriously
      wrong.  Upping the priority.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. priority changed to: "7 High"
    5. username: "dkf"
  7. Ticket change [cc544d76eb] (rid 95681) by dkf on 2002-01-18 16:24:24:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      But substituting ^ for \A makes the problem go away; maybe
      the bug lies there?
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  8. Ticket change [0550f07032] (rid 89037) by hartweg on 2002-04-18 17:00:35:

    1. icomment:
      Logged In: YES 
      user_id=338658
      
      Just an observation that may (or may not) help track this 
      down. If the \s* elements are removed (which still gives 
      desired output sinces they are redundent as whitespace is 
      also "eaten" by the [^>]* or [^b]* elements) then the error 
      does not occur.
      
      
    2. login: "hartweg"
    3. mimetype: "text/plain"
    4. username: "hartweg"
  9. Ticket change [6de287bec7] (rid 128779) by mistachkin on 2003-05-10 17:24:57:

    1. foundin changed to: "None"
    2. icomment:
      Logged In: YES 
      user_id=113501
      
      I don't know if this helps, but I traced the problem to 
      this line (with assert enabled, that is):
      
      regexec.c, near line #318
      
      assert(end != NULL); /* search RE succeeded so loop 
      should */
      
      By the way, this still applies in CVS HEAD (8.5a0).
      
      
      
      
    3. login: "mistachkin"
    4. mimetype: "text/plain"
    5. username: "mistachkin"
  10. Ticket change [509841d50b] (rid 126000) by mistachkin on 2003-05-10 20:10:15:

    1. icomment:
      Logged In: YES 
      user_id=113501
      
      After further research, I have uncovered the following 
      information:
      
      In file regexec.c on line #281, there is the following 
      code:
      
      close = shortest(v, s, v->start, v->start, v->stop, 
      &cold, (int *)NULL);
      
      This call is not producing the correct result for 
      this "buggy" regexp.  I came to this conclusion after I 
      was able to obtain the correct result by manually setting 
      the loop start variable begin to the value of v->start.  
      As we can see here, "begin" gets it's initial value from 
      the variable "open", which gets it's initial value from the 
      variable "cold", which is set by function "shortest" prior 
      to the loop.  The following attempts to illustrate the 
      flow of this very important value:
      
      cold = NULL;
      close = shortest(v, s, v->start, v->start, v->stop, 
      &cold, (int *)NULL);
      
      <more code here>
      
      open = cold;
      cold = NULL;
      
      <more code here>
      
      for (begin = open; begin <= close; begin++) {
        <more code here>
        <this loop is extremely sensitive to the starting value 
      of "begin">
      }
      
      Further analysis reveals the reason why the 
      variable "cold" is getting an invalid value (off by 
      one "character", which is actually 2 bytes).  
      
      This is due to function "shortest" calling 
      function "lastcold", which iterates through the "d-
      >ssets" array looking for a NOPROGRESS flag.  
      
      I believe this is the root cause of the problem, the 
      NOPROGRESS flag is being set on d->sset[2] incorrectly, 
      specifically in the "miss" function called (quite a few 
      times) by:
      
      find --> shortest --> miss
      
      The interesting thing about this is that it appears to be 
      a very fancy off-by-one error.
      
      It may be worthwhile to further analyze the differences 
      between "{^blah}" and "{\Ablah}" to understand why the 
      NOPROGRESS flag is being set incorrectly.
      
      
      
    2. login: "mistachkin"
    3. mimetype: "text/plain"
    4. username: "mistachkin"
  11. Ticket change [e4a7e97793] (rid 87989) by dgp on 2003-11-13 05:18:08:

    1. assignee changed to: "pvgoran"
  12. Ticket change [f583bab140] (rid 130120) by dgp on 2003-11-13 08:16:53:

    1. foundin changed to: "obsolete: 8.4.5"
  13. Ticket change [ead9e148bf] (rid 103439) by pvgoran on 2003-11-15 18:37:23:

    1. icomment:
      Logged In: YES 
      user_id=383758
      
      This bug results from an error in code that splits states into 
      "progress" and "no-progress" ones. This error causes an 
      interesting situation with the pre-collected single-linked list of 
      states to be splitted: many items were added to the list, but 
      only several of them are accessible from the list beginning, 
      since the "tmp" member of struct state (which is used here to 
      hold a pointer to the next list item) gets overwritten, which 
      results in a "looped" chain. As a result, not all of states are 
      splitted, and one state is splitted two times, causing incorrect 
      "no-progress" flag values.
      
      The bug fix is checked into CVS (regcomp.c, revision 1.8). 
      Also, a patch with this fix is attached here.
      
      
    2. login: "pvgoran"
    3. mimetype: "text/plain"
    4. username: "pvgoran"
  14. Ticket change [96186423d3] (rid 106264) by pvgoran on 2003-11-15 18:41:28:

    1. icomment:
      
      
      File Added - 67582: regcomp.c.diff
      
      
      
    2. login: "pvgoran"
    3. mimetype: "text/plain"
    4. username: "pvgoran"
  15. Add attachment "regcomp.c.diff" [2be80100e1] (rid 118822) by pvgoran on 2003-11-15 18:41:28.

  16. Ticket change [a254314b2b] (rid 109871) by pvgoran on 2003-11-15 18:43:39:

    1. closedate changed to: "2003-11-15T11:43:39"
    2. closer changed to: "pvgoran"
    3. resolution changed to: "Fixed"
    4. status changed to: "Closed"
  17. Ticket change [c14f79ab55] (rid 111303) by dgp on 2003-11-16 01:05:37:

    1. assignee changed to: "dgp"
    2. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Thanks!  Assigning back
      to myself for the addition
      of tests to the test suite,
      and to consider a backport
      for Tcl 8.4.5.
      
      
    3. login: "dgp"
    4. mimetype: "text/plain"
    5. status changed to: "Open"
    6. username: "dgp"
  18. Ticket change [71012d1f2b] (rid 100586) by dgp on 2003-11-18 00:44:55:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Added tests reg-33.* to test
      all the bugs fixed by this patch.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  19. Ticket change [3db72e3308] (rid 121136) by dgp on 2003-11-18 00:53:23:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Back ported fixand tests  for Tcl 8.4.5.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. status changed to: "Closed"
    5. username: "dgp"
  20. Ticket change [a33f347a00] (rid 110020) by dgp on 2003-11-18 00:53:24:

    1. closedate changed to: "2003-11-17T17:53:24"
    2. closer changed to: "dgp"