Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-7743

Fix integer overflow within wt2999_join_extractor csuite test

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT10.0.1, 5.1.0, 4.4.8, 5.0.2
    • Component/s: None
    • Labels:
    • Story Points:
      2
    • Sprint:
      Storage - Ra 2021-07-12

      Description

      Fallout of errors coming from new UBSAN Build variants in WT-7552. Within test/csuite/wt2999_join_extractor/main.c.

       [2021/06/28 05:05:12.512] ================================
       [2021/06/28 05:05:12.512] ../../../test/csuite/wt2999_join_extractor/main.c:122:13: runtime error: signed integer overflow: 2147450890 + 65536 cannot be represented in type 'int'
       [2021/06/28 05:05:12.512]     #0 0x42329a in main /data/mci/ca8a7d950f1bf956b286e945a18a82e9/wiredtiger/build_posix/test/csuite/../../../test/csuite/wt2999_join_extractor/main.c:122:13
       [2021/06/28 05:05:12.512]     #1 0x7fedf0651bf6 in __libc_start_main /build/glibc-S9d2JN/glibc-2.27/csu/../csu/libc-start.c:310
       [2021/06/28 05:05:12.512]     #2 0x4035d9 in _start (/data/mci/ca8a7d950f1bf956b286e945a18a82e9/wiredtiger/build_posix/test/csuite/test_wt2999_join_extractor+0x4035d9)
       [2021/06/28 05:05:12.512] FAIL test_wt2999_join_extractor (exit status: 1)
      

      The error is pointing towards this line.

          key = 10;
          val[0] = 20;
          val[1] = 30;
          for (i = 0; i < 100000; ++i) {
              key += i;
              val[0] += i;
              val[1] += i;
              cursor1->set_key(cursor1, &k);
              cursor1->set_value(cursor1, &v);
              testutil_check(cursor1->insert(cursor1));
          }
      

      Seems that the variable key is getting an integer overflow. Verify with UBSAN build again once fixed.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              alexey.anisimov Alexey Anisimov
              Reporter:
              jie.chen Jie Chen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: