LLIL SSA Lifting error when an intrinsic returns two values which both get used later #6265
Labels
Component: Core
Issue needs changes to the core
Effort: Low
Issue should take < 1 week
Impact: Medium
Issue is impactful with a bad, or no, workaround
Type: Bug
Issue is a non-crashing bug with repro steps
Milestone
Version and Platform (required):
Bug Description:
For x86/x64 binaries, the
rdtsc
instruction isn't lifted very nicely, and produces hard to read HLIL.For this assembly:
This HLIL is produced:
I would say there are 3 issues with this code:
tsc
variable/argument, adds a line that just clutters output. This issue is already reported in RDTSC intrinsic takes TSC register as an argument #4032.temp0
/temp1
are meant to representeax
/edx
, but output makes it seem like onlytemp0
is assigned to by therdtsc
call andtemp1
is just some uninitialized variable. Should probably betemp0, temp1 = _rdtsc()
_rdtsc
was just a single 64-bit variable and the HLIL was simplyreturn _rdtsc()
For comparison, here is the IDA pseudo-code for the same function:
Steps To Reproduce:
0f3189c748c1e2204809d74889f8c3
Expected Behavior:
Ideally, the HLIL would just be
return _rdtsc()
.The text was updated successfully, but these errors were encountered: