Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pcmpistri lifting infine loop #31

Closed
enkomio opened this issue Mar 20, 2020 · 4 comments
Closed

pcmpistri lifting infine loop #31

enkomio opened this issue Mar 20, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@enkomio
Copy link
Contributor

enkomio commented Mar 20, 2020

Describe the bug
Lifting of Intel instruction PCMPESTRI causes an infinite loop.

To Reproduce
The following code triggers the infinite loop.

let handler = BinHandler.Init(isa, ArchOperationMode.NoMode, false, 0UL, [|0x066uy; 0x00fuy; 0x03auy; 0x063uy; 0x0c1uy; 0x041uy|])
let stmts = 
  match BinHandler.LiftBBlock handler 0UL with
  | Ok (stmts, addr) -> stmts
  | Error (stmts, addr) -> stmts
Console.WriteLine("This code is never reached")

Function genOutput seems to be the cause of the infinite loop.

Expected behavior
Valid LowUIR statements are generated

Environment (please complete the following information):

  • OS: Windows
  • .NET Core version: 3.1
  • B2R2 version 0.3.1

Additional context
The Intel instruction used for the test is: pcmpistri xmm0, xmm1, 41h

@enkomio enkomio added the bug Something isn't working label Mar 20, 2020
@sangkilc
Copy link
Member

Thanks for the report. This was a known issue and fixed in our internal branch. I will upload the fixed version ASAP.

@sangkilc
Copy link
Member

bb82fa8 fixes the bug.

FYI, the current master branch has some API function changes, which can break your current code potentially. Especially, the AST has been modified to support floating-point operations. We will officially support FP operations later.

@enkomio
Copy link
Contributor Author

enkomio commented Mar 21, 2020

Awesome, thank you for the promptly fix! About the potential issues due to the API change, do you have an estimate date for the release of the new version? I have another project that uses B2R2 quite extensively and my plan was to upgrade to the new version.

@enkomio enkomio closed this as completed Mar 21, 2020
@sangkilc
Copy link
Member

Our hope is to release it by the end of Apr. But very difficult guarantee it at this moment because we have so many other deadlines 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants