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

    <tr>
        <th>Summary</th>
        <td>
            deque is missing safe libc++ hardening checks
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    https://libcxx.llvm.org/UsingLibcxx.html#enabling-the-safe-libc-mode

vector's operator[] uses _LIBCPP_ASSERT_UNCATEGORIZED: https://github.com/llvm/llvm-project/blob/7b64d761098fdbb426b27ca58a9dc8f31917dcba/libcxx/include/vector#L1534C5-L1534C33

deque's operator[] just reads OOB without an assert: https://github.com/llvm/llvm-project/blob/7b64d761098fdbb426b27ca58a9dc8f31917dcba/libcxx/include/deque#L1645-L1661

Same for [deque::front()](https://github.com/llvm/llvm-project/blob/7b64d761098fdbb426b27ca58a9dc8f31917dcba/libcxx/include/deque#L1699) and other methods that return a reference.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzEk0tP5DgQxz9N5WJ1y7E7Dx9ySNNkhdRaEI_LXpAflY7BiVnbAfbbr5IeGEaay5y4pBSXbf1-Zf1ljPY0ITZQ7KE4ZHJOgw-NkZN8fsqUN_81Q0ovEXgLrAPWOav0-_vWuddx68MJWPcQ7XQ6npeHNDpgHCepnJ1OmzTgJsoeN8uxzegNAj0Abc_fV9TJB2BVJP4Fg1x-VgwyR4zk8Xi1v7i5eWzv7i5v7x8f_r5o7y__ur69-ufyALwlv4KdbBpmtdV-XCjd60fZvAT_hDoB65TzClhXqXJnqjKnou6NUjtWKlZpWdRSGF33PBd5ZbSSn7bAOjtpNxsE1n1A82Ne8N1FsTlXzr-aGfx3xt-JPc0xkYDSRHJ9vSdvNg1-TkRORMaIIX2f1w9kfszL3SJVlvlXozs5Iul9IFDsz1t5C7ztg58SsBqYgOIArP52eCGACSInQ3waMJAR0-BNJGmQy-TTHCYiScAeA04at5lpuBFcyAybvKwFFbXY8WxoVCm1UKbuGS91gTWvsKJUlkIqLakwmW0YZZxWeZ7XtC7ElpfISyr7igmme8lhR3GU1n2mJbMxztiUvKYic1Khi2vwGJvwjaxNYGzJYWjWMan5FGFHnY0p_rwl2eSwWZ2JjWS0cYkgWYJGluEA2wPbk0EGg9PS0QPq55jNwTV__D4rVQTWrdT_BwAA___-M1FX">