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

Fix null pointer passed to memset in test_wt3338_partial_update

    XMLWordPrintable

    Details

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

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            jeremy.thorp Jeremy Thorp
            Reporter:
            tammy.bailey Tammy Bailey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: