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

    <tr>
        <th>Summary</th>
        <td>
            llvm/unittests/Analysis/ConstraintSystemTest.cpp crashes in debug mode
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            test-suite
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          pranavk
      </td>
    </tr>
</table>

<pre>
    #77945 flipped the global llvm::DebugFlag which exposed a bug in ConstraintSystem::dump() which now fails with assertion failure when trying to access out of bounds values in Names SmallVector. The problem is we don't add anything to Values2Index when calling addVariableRow() in ConstraintSystemTest.cpp.

To reproduce you may need to pass either -debug flag or just hardcode llvm::DebugFlag = true in ConstraintSystemTest.cpp
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8kkGPozgQhX-NuZQ6AgMhHDhkN4q0lz1Mt_pe2BVwj7GRq9zp_PsRSaS59MwFIduvXr1PD5ndFIgG1f6j2lOBWeaYhjVhwM-fxRjtbVC67rq-aeHi3bqSBZkJJh9H9OD956Lqo6qPJxrzdPY4wXV2Zgb6WiOTBYQxT-AC_BsDS0IX5PXGQk-Zzcuq9EHp_qkL8QoXdJ7h6mQGZKYkLob7YU4E15kCSLq5MIFEQGOIGWIWiBcYYw6W4RN9Jt5c_8eFGF4X9P6djMS0g7eZYE1x9LSAY7gS2BiU7gTQWsBwk_k5-_0-Rv8XLH09fA16v12ite-YHI6efsTrM8A3Id-IZWfWdafKkyqPj-9bhERrijYbglvMsOANAm1kI6zIDORkpgQvdoMKl41qTPCRWWDGZE209C16VZ9AUqa_rVLYobZ93WNBQ9WV7f7Q7-uqmAdqu9GajsYKyej9eGlNZ_u-3zdktSnLwg261E1ZVX11aMq62jW2bqqm1X1Hl30zompKWtD53bbbLqapcMyZhu7QtfvC40ie703TWojlhbMTUlpvzUvDJnoZ88SqKb1j4d9jxImn-wOlzzk42eSs9PkY0N_Ybb9_ygsmIc-PNjx4LtFSkZMfZpGVN4b6rPR5cjLncWfiZvL0uu-0pvhBRpQ-3-NsZvdEvwIAAP__PckbCQ">