[drreg] GPR value not preserved on fault when there's intervening app read
(Copying from #3823 (closed)) The following sequences causes failure to restore gpr value on fault:
reserve reg r1, spill app-val to spill slot s1
tool-write to r1
spill tool-val of r1 to spill slot s2
restore app-val of r1 from s1 // drreg_event_restore_state loses its book-keeping of r1's spill slot here
app instr that reads r1
restore tool-val of r1
fault
drreg_event_restore_state
loses its book-keeping when it sees the first restore of r1: https://github.com/DynamoRIO/dynamorio/blob/e8fc651f485f858127bf2394defc382d5cdff641/ext/drreg/drreg.c#L1897.
This is demonstrated by test_asm_faultH
on PR #4932.