drmemtrace: Incorrect kernel xfer marker for signals received at end of wrapped function
A proprietary app hit the "Signal handler return point incorrect" invariant error. This happens for signals received at the end of a function that was wrapped with drwrap.
view
output before the error at 23871501
:
23871110 17417534: T751373 <marker: function #9> // wrapped function starts
23871111 17417534: T751373 <marker: function return address 0xaaaae88c138c>
...
23871133 17417549: T751373 ifetch 4 byte(s) @ 0x0000aaaae891ee04 d65f03c0 ret %x30 // wrapped function ends
23871134 17417549: T751373 <marker: kernel xfer from 0xaaaae6bf81a8 to handler> // signal arrives: wrong marker value. This should be 0xaaaae88c138c, but it's probably replace_retaddr_sentinel.
... <signal processing>
23871496 17417807: T751373 <marker: syscall xfer from 0xaaaae6bffcf0> // signal returns
23871499 17417807: T751373 <marker: function #9> // drwrap post-wrap callback
23871500 17417807: T751373 <marker: function return value 0x3528260f6028>
23871501 17417808: T751373 ifetch 4 byte(s) @ 0x0000aaaae88c138c // back to actual app return address
-no_record_replace_retaddr
resolves this, but we should fix it for -record_replace_retaddr
too.