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

Removing c++ test frameworks for memory sanitizer testing

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT10.0.0, 4.9.0, 4.4.5
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • 2
    • Storage - Ra 2021-02-22

      MSAN testing falsely reported a use-of-uninitialized-value when running poc_test, the cause was calling c_str on a string passed into wiredtiger_open.

      The log for the test is here: https://spruce.mongodb.com/task/wiredtiger_rhel80_make_check_msan_test_patch_03aea58a2640ba6a048f6eee2a7b7d52d8809d70_601a35733627e0294b197924_21_02_03_05_32_54/logs?execution=0

      Viewing online discussion about this it appears we need to compile the standard library with memory sanitizer. More info here:
      https://github.com/google/sanitizers/wiki/MemorySanitizerLibcxxHowTo

      While we can fix the potential causes in the test framework it would be good to implement a long term solution.

      Update:
      We'll disable memory sanitized testing for WiredTiger c++ code. To do so I believe all we need to do is pull out CXXFLAGS='-fsanitize=memory' from the evergreen.yml. To test add the following code to test/poc.cxx main.c and either do an evergreen patch build or compile with memory sanitizer.

          std::string err_string = "error";
          std::cout << "MSAN error: "<< err_string.c_str() << std::endl;
      

            Assignee:
            luke.pearson@mongodb.com Luke Pearson
            Reporter:
            luke.pearson@mongodb.com Luke Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: