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

    <tr>
        <th>Summary</th>
        <td>
            UB in llvm-project/libc/src/string/memory_utils/utils.h:assume_aligned
        </td>
    </tr>

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

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

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

<pre>
    UBSan running on RISC-V (Fuchsia) is reporting an undefined behavior at https://github.com/llvm/llvm-project/blob/e6cd409fc6396cb13c59b4a5190abc4b856f22a5/libc/src/string/memory_utils/utils.h#L87

```
assumption of 2 byte alignment for pointer of type 'const __llvm_libc::cpp::byte *' failed, address is 1 aligned
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUUk1r3DAQ_TXji8gijy1_HHzYJBgKPTWk10UfY1utVjKSnLL_vti7pZBbQMxIjHjzZt6TKdnZEw0gngFx1ovM5CgDIojXQm55CXFYKcclJPpdqGBuw_vzm_Qsbt5bP7Pg2Y9vby9PPxlgN256SVYC9swmFmkNMe-fpGebNzRZT4YpWuSHDZHJzJac1wTVGXAEHGebl02ddLgCjs59_EtPawy_SGfAUbmgAEdqtKl5P-mm6hutykqLXtVSlD2XSteqE82EKMUOYJUGHFM8Yo7Wz4Djla4h3i5bti4Bjkc-LYDV964F_gr8_IgNf5zjKVParmu2wbMwMWTqlolJZ2d_JZ_ZFCJbg_WZ4l7Pt5UYYKuDT5ldLvssl4NPdYbqrNf1fjlQAM-ALZukdWQAX5g0JlJK-ybLew8yn0gVZqhMX_WyoKFsekQh6rYrlkHUVJIue8RJlRxNXapJ1h12bSt4q0xhB-RY8a5seSNa0Z0mrDi2NRrqRG9QQ83pKq077aRPIc6FTWmjoalb0RVOKnLpYRtPf9hRfNgmDodoapsT1NzZlNN_lGyzo-H9mVnPPmn7JaWquxZ0eWym2KIbvmyng_YOe4z1NwAA__-N2fnS">