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

    <tr>
        <th>Summary</th>
        <td>
            [libc++] _LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY for hashmap-based containers?
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            libc++
      </td>
    </tr>

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

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

<pre>
    Hi, in a project that I work on I see a lot of code that implicitly depends on order of elements in hashmap-based containers (unordered_set/map/multimap).
I wonder if it is only me, or is anyone else is interested in shaking order of elements in hashmap based on compile define like _LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY ?
Maybe we can wrap hash function if such compile definition is used, and shake it a bit to produce different results, which will in turn produce different order of elements in hashset.

Is this a good idea?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUk01vozoUhn-N2Rw1IgZasmCRNOFepLa3um0XM5vI2Ac4U2Mj2zTKvx-ZRJoZaTrSSIgvn4_3eX0svKfeIFas2LFin4g5DNZVVlttezJJa9W5-pcYvwcyIGBy9hvKAGEQARo4WfcO1kADHhEEaBvAdiCtwksIjZMmSUGfQeGERvkYbp1CFwNR44gm-Fh8EH4YxXTTCo8KpDVBkEHngfFyNksKqqPHwHg9iineZx1oed2sWLpn6TYqMrE2dUABKHbTZxgxAlgXfwhztgYBtcf4SSagQx9QRQ1-EO9k-j8KhItAa0DacSKNoLAjg6DpHeH40Ozun5-P-8Pu7Z_j_9un_X-PzdfD8e3p5flw39TNYX98ed3umofm9QuwrL4IfxTnFuGEIIWBkxPT0g262chA1kQeP8vh15Z0WfIwe1SRUBi1IGCEF9BSgGDjnqlZIijqOnRoAjj0sw4-ppwGkgOcSOuIGGZnfhP_qR0ew9X5q_8ewhBNht5aBaRQsKxOVJWpTbYRCVbrO56lvExLngxVUeS8bXPF1TrNsbgrRIm5QtGV7eZWituEKp7yPC3Tu3Va5DlfZaW8LQpM87yUIm8Llqc4CtIrrT_GlXV9Qt7PWK1TnqVZokWL2i_DzbmmVjK-Wy4eh91VMeumnXvP8lSTD_5HnUBBL8fip7Ri_5f721n36VxHY2anqyGEybNsy3jNeN1TGOZ2Je3IeB3FXB8315PHeL0QesbrK-RHxb8HAAD__5rqQRU">