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

Fix null pointer passed to memset in test_wt3338_partial_update

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT10.0.1, 4.4.8, 5.0.2, 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • 2
    • Storage - Ra 2021-07-12

      The UBSAN builder found the following error:

      [2021/07/01 00:28:14.872] FAIL: test_wt3338_partial_update
      [2021/07/01 00:28:14.872] ================================
      [2021/07/01 00:28:14.872] ../../../test/csuite/wt3338_partial_update/main.c:129:12: runtime error: null pointer passed as argument 1, which is declared to never be null
      [2021/07/01 00:28:14.872] /usr/include/string.h:60:62: note: nonnull attribute specified here
      [2021/07/01 00:28:14.872]     #0 0x42540f in slow_apply_api /data/mci/f7c212376a3c6a98bc4e4be5292cf0be/wiredtiger/build_posix/test/csuite/../../../test/csuite/wt3338_partial_update/main.c:129:5
      [2021/07/01 00:28:14.872]     #1 0x4236f9 in modify_run /data/mci/f7c212376a3c6a98bc4e4be5292cf0be/wiredtiger/build_posix/test/csuite/../../../test/csuite/wt3338_partial_update/main.c:297:13
      [2021/07/01 00:28:14.872]     #2 0x4233d2 in main /data/mci/f7c212376a3c6a98bc4e4be5292cf0be/wiredtiger/build_posix/test/csuite/../../../test/csuite/wt3338_partial_update/main.c:341:5
      [2021/07/01 00:28:14.872]     #3 0x7fb7c90aebf6 in __libc_start_main /build/glibc-S9d2JN/glibc-2.27/csu/../csu/libc-start.c:310
      [2021/07/01 00:28:14.872]     #4 0x403909 in _start (/data/mci/f7c212376a3c6a98bc4e4be5292cf0be/wiredtiger/build_posix/test/csuite/test_wt3338_partial_update+0x403909)
      [2021/07/01 00:28:14.872] FAIL test_wt3338_partial_update (exit status: 1) 

      The failing code is as follows:

      memset((uint8_t *)ta->mem + ta->size, 0xff, ta->memsize - ta->size); 

      A fix similar to the one in WT-7744 should work here.

            Assignee:
            jeremy.thorp@mongodb.com Jeremy Thorp
            Reporter:
            tammy.bailey@mongodb.com Tammy Bailey (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: