<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/63414>63414</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            False positive uninitialized value warnings in MemorySanitizer
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          k-morozov
      </td>
    </tr>
</table>

<pre>
    Hello,

I am using MemorySanitizer to detect issues with uninitialized values in my code. However, I am encountering warnings that I cannot understand or resolve.

I have a test code that utilizes the LockFreeStackCounting class to test a stack. I have made sure that all variables and objects in the class are properly initialized before use, and there are no uninitialized data in my code.

However, MemorySanitizer continues to issue warnings about the use of uninitialized values in the std::char_traits<char>::assign() function. I have reviewed the rest of the code and cannot identify where this issue might arise from.

I am using clang++-15, and I have checked other parts of the code but cannot find the source of the problem. I have also ensured that all variables are passed and used correctly.

I would appreciate it if you could provide insight into what issue the MemorySanitizer warning might indicate and how I can address it. Could there be other aspects of my code that I should consider, or are there other factors that I need to take into account?

I have attached the test code that triggers the warning, and I can provide any additional helpful information upon request.

Thank you in advance for your assistance.

LockFreeStackCounting: https://pastebin.com/Rf0m20W9
unit-test: https://pastebin.com/7f5fXM9E

Failed CI: https://github.com/k-morozov/sync_cpp/actions/runs/5326397642/jobs/9648392789
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEVU2T2zYM_TX0BbMembK99sGHzSaaZKa5NJ1pbxmIgixmKUIlQXucX9-hJO-Hu2kvqzVJAO89PJAYoz16ooPafFCbjwtM0nE4PN31HPgnnxY1N5fDZ3KOlX5UxUdVPEx_vwD2kKL1R_hKPYfLN_RW7E8KIAwNCRkBG2OiCGcrHSRv8wF09ic1cEKXd6yH_gKGG1rCZz7TiYLSjzAmJ284eaGQa5wxeOuPEaRDgS9g0HsWSL6hEAV9AxwgUGR3ouVbnB2eCBCEooy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