On 11/06/2015 07:39 PM, Jeff Law wrote:
Given the name "..may_trap_or_fault_p" ISTM that its mode of operation
should be to return true (the safe value) unless we can prove the write
will not fault.  The more cases we can prove true, the better AFAICT.

The PLUS case looks totally wrong.  Though it could possibly be made
correct by looking for [sp,fp,ap] + offset addresses and verifying we're
doing a mis-aligned write.  We'd probably also need some kind of
sensible verification that the offset isn't too large/small.

I'm guessing this is already covered by the call to may_trap_or_fault_p. The only additional thing that this function tries to prove is that the mem isn't readonly. IMO either MEM_READONLY_P is sufficient for that (and my patches operate under that assumption), or it isn't sufficient and no amount of checking the address is going to make the function useful.


Bernd

Reply via email to