#5321·miri

*ptr += 1 通过带有 exposed_provenance_mut 的指针不会被报告为 UB,而 *ptr = 1 则会被报告为 UB

作者: Roticv912创建于 2026年9月18日更新于 2026年9月18日

In the program below, *ptr += 1; runs without any error and the write takes effect, while changing it to *ptr = 1; is reported as UB.