You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I did some investigation on this issue, and it turns out to be somewhat tricky. Not because the specific symptom is hard to address, but because it exposes a gap in the compiler's modeling more broadly.
The fundamental problem is that LLVM is not modeling the valid bit at all, and therefore was completely unaware that a function call like free might change it. That can be bandaided by telling LLVM to pretend that reading the valid bit reads from memory, which will cause it to conservatively preserve the ordering of that read with respect to things like calls to free.
However, this causes knock-on effects because it turns out that we depend on valid bit reads not having side effects, to implement things like CToPtr when implementing CHERIv9 semantics. There's probably other intrinsics lurking around that depend on it as well.
The followling
gives
The text was updated successfully, but these errors were encountered: