SQLite

Check-in [0772ddf5]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Make the regexp extension more robust against OOM errors during compilation of the recognizer engine. Forum post f50aecd5e8.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 0772ddf56713d013cd1bd44f9c75977ca14f852e3a8f038b0a6b9814f6519d79
User & Date: drh 2023-05-12 15:45:34
References
2023-05-12
19:06
Fix harmless compiler warning caused by [0772ddf56713d013]. (check-in: f06c16a8 user: drh tags: trunk)
Context
2023-05-12
21:21
CLI resource management applied to about 30% of shell source. A few minor flaws fixed. Comments begin to describe OOM responses. (check-in: ce25a079 user: larrybr tags: cli_extension)
19:02
Add multi-threaded test for "INSERT ... RETURNING ..." and SQLITE_BUSY errors. (check-in: 559cb1c6 user: dan tags: trunk)
15:45
Make the regexp extension more robust against OOM errors during compilation of the recognizer engine. Forum post f50aecd5e8. (check-in: 0772ddf5 user: drh tags: trunk)
14:51
Fix unlikely strange result of CLI edit(). (check-in: ab3797e8 user: larrybr tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to ext/misc/regexp.c.
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
            re_append(p, RE_OP_CC_RANGE, c);
          }else{
            re_append(p, RE_OP_CC_VALUE, c);
          }
          if( rePeek(p)==']' ){ p->sIn.i++; break; }
        }
        if( c==0 ) return "unclosed '['";
        p->aArg[iFirst] = p->nState - iFirst;
        break;
      }
      case '\\': {
        int specialOp = 0;
        switch( rePeek(p) ){
          case 'b': specialOp = RE_OP_BOUNDARY;   break;
          case 'd': specialOp = RE_OP_DIGIT;      break;







|







615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
            re_append(p, RE_OP_CC_RANGE, c);
          }else{
            re_append(p, RE_OP_CC_VALUE, c);
          }
          if( rePeek(p)==']' ){ p->sIn.i++; break; }
        }
        if( c==0 ) return "unclosed '['";
        if( p->nState>iFirst ) p->aArg[iFirst] = p->nState - iFirst;
        break;
      }
      case '\\': {
        int specialOp = 0;
        switch( rePeek(p) ){
          case 'b': specialOp = RE_OP_BOUNDARY;   break;
          case 'd': specialOp = RE_OP_DIGIT;      break;