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
Get ykllvm to provide enough info to identify a zero-length call.
PT has this clause where returns are not compressed if the call is both
direct and to the address immediately after the call.
Section 33.4.2.2:
> For near CALLs, push the Next IP onto the stack... Note that this
> excludes zero-length CALLs, which are direct near CALLs with
> displacement zero (to the next IP). These CALLs typically don’t have
> matching RETs.
For example, this kind of thing is never compressed:
```
0x1234: call 0x1242
0x1242: pop rax
```
On x86_64 the instruction pointer register isn't addressable, so people
sometimes use this trick to get its value.
This change makes the compiler emit enough call information for the
runtime to decide whether a call was "zero-length" (namely the return
address of the call).
It's not clear to me if this has ever bitten us, but it could be one of
the causes of the rare PT decoding crashes that occasionally crop up.
0 commit comments