lifting-bits / remill

Library for lifting machine code to LLVM bitcode
Apache License 2.0
1.27k stars 143 forks source link

Infinite recursion in the semantics #504

Closed DCNick3 closed 3 years ago

DCNick3 commented 3 years ago

It seems that the implementation of the FCOMP (and FUCOMP) with memory argument results in an infinite recursion:

template <typename S2>
DEF_FPU_SEM(FUCOMPmem, RF80 src1, S2 src2) {
  SetFPUDp(src2);
  return FUCOMPmem(memory, state, src1, src2, pc, fop);
}

template <typename S2>
DEF_FPU_SEM(FCOMPmem, RF80 src1, S2 src2) {
  SetFPUDp(src2);
  return FCOMPmem(memory, state, src1, src2, pc, fop);
}

Probably some other function should have been called...

pgoodman commented 3 years ago

@DCNick3 good find! Can you submit a PR that calls whatever was meant to be called?

DCNick3 commented 3 years ago

I think if I will poke around I will find which one is meant to be called and submit a PR