Git Product home page Git Product logo

Comments (8)

saeschdivara avatar saeschdivara commented on August 21, 2024

I am preventing the abortion with this code:

    Expression::SPType operand0 = rInsn.GetOperand(0);
          Expression::SPType operand1 = rInsn.GetOperand(1);

          if (operand1 == nullptr) {
              Log::Write("operand 1 is null");
              return false;
          }

          auto pExpr1 = /* Semantic: if zf.id == int1(1): op0.val = op1.val */
          Expr::MakeIfElseCond(
            ConditionExpression::CondEq,
            Expr::MakeId(X86_FlZf, &m_CpuInfo),
            Expr::MakeConst(1, 0x1),
            Expr::MakeAssign(operand0, operand1),
            nullptr);
          AllExpr.push_back(pExpr1);
          rInsn.SetSemantic(AllExpr);

in the following file: src/arch/x86/x86_opcode.cpp

from medusa.

wisk avatar wisk commented on August 21, 2024

It may looks radical, but this behavior is desired. Just attach a debugger and look in the call stack to find the buggy instruction.
I can take a look on this bug if you can share your executable. :)

from medusa.

saeschdivara avatar saeschdivara commented on August 21, 2024

Well, how could I best share this exe with you?

from medusa.

wisk avatar wisk commented on August 21, 2024

4shared.com is ok I guess.

from medusa.

saeschdivara avatar saeschdivara commented on August 21, 2024

I really think that the code of the file has something wrong. At least if I look at this: http://pedump.me/a772ef7449783ee4edc60dd0b006ffe6/#disasm

from medusa.

wisk avatar wisk commented on August 21, 2024

Thanks for sharing, the buggy instruction was cmpxchg8b, the fix is 1d61c8e

from medusa.

saeschdivara avatar saeschdivara commented on August 21, 2024

Hey I've just tested your fix. It works :)
Nice job.
How do you test these things? Just debugging the application or using something different?

from medusa.

wisk avatar wisk commented on August 21, 2024

Thanks, it's actually pretty easy to debug these issues:

  • start qMedusa with a debugger,
  • wait for the assert to make the application crash,
  • the debugger catches this exception/signal and stops,
  • display the callstack
  • find the faulty instruction
  • ???
  • profit :)

from medusa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.