Microsoft 开发人员网络 > 论坛主页 > Phoenix > Help with Assertion failures
提出问题提出问题
 

已答复Help with Assertion failures

  • 2009年5月29日 9:22if if 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     
    Hello all,
    I'm trying to instrument some code, which involves creation of new temporary and assigning another variableOperand as it is to the temporary, as well as adding something to that variableOperand and assigning that to the newly created temporary. The instrumentation also introduces some branches.
    I'm getting the following error in the process. Can somebody please suggest or give and idea of where I might be wrong.

    -------------------------------------------------------------------------

    Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\targets\architectures\x86\function-linkage.cpp, Line 374
      Unreached
      in (Function number 2) _main [line 28] during Lower
      in (Module) ../testFiles/testFunc.c
    Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\phx\ir\ir.cpp, Line 10578
      reg != nullptr : SinkDestinationToRegister should only be used with a valid register
      in (Function number 2) _main [line 28] during Lower
      in (Module) ../testFiles/testFunc.c
    Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\phx\ir\ir-constructor.cpp, Line 484
      variableOperand->IsTemporaryRegister
      in (Function number 2) _main [line 28] during Lower
      in (Module) ../testFiles/testFunc.c
    Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\targets\architectures\x86\lower.cpp, Line 515
      Unreached : Unhandled Assign
       tv290-(RegisterCandidate) = ASSIGN t302                                  #28
      in (Function number 2) _main [line 28] during Lower
      in (Module) ../testFiles/testFunc.c
    Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\targets\runtimes\base\lower.cpp, Line 1458
      (nextInstruction != nullptr) : Custom processing did not return next instruction to process
      in (Function number 2) _main [line 28] during Lower
      in (Module) ../testFiles/testFunc.c
    Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\targets\runtimes\base\lower.cpp, Line 1481
      previousInstruction != nullptr : Lower expansion is skipping instructions
       tv290-(RegisterCandidate) = ASSIGN t302                                  #28
      in (Function number 2) _main [line 28] during Lower
      in (Module) ../testFiles/testFunc.c
    Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\targets\runtimes\base\lower.cpp, Line 1546
      newInstruction->IsPseudo || newInstruction->WasLegalized || !newInstruction->IsLir || newInstruction->IsCommon : Customized expansion not f
    ull legalized, call Lower->Range
       ESP               = add ESP, 4                                           #28
      in (Function number 2) _main [line 28] during Lower
      in (Module) ../testFiles/testFunc.c
    fatal error C1001: An internal error has occurred in the compiler.
    (compiler file 'd:\enlistments\sdk_june08\src\clients\c2\c2-diagnostics.cpp', line 704)
    Access Violation Fault (instruction at "0x303B99D9" read memory at "0x0000000C")
    Internal Compiler Error in c:\Program Files\Phoenix SDK June 2008\bin\debug\x86\cl.exe.  You will be prompted to send an error report to Micr
    osoft later.

    -------------------------------------------------------------------------


    Regards,
    If If

答案

  • 2009年6月4日 8:10if if 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     已答复

    I was doing the instrumentation after CxxIL Reader phase.
    The problem was that because my function returned a boolean, I used RegisterCondType for its return value and then used that in the compare instruction as a source. But turns out that the CompareInstruction requires sources to be of IntType.


    Regards,
    If If

    • 已标记为答案if if 2009年6月5日 6:27
    •  

全部回复

  • 2009年6月3日 16:42Andy Ayers - MSFT版主用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     
    When (where in the phase list) are you doing instrumentation?
    Architect - Microsoft Phoenix Project
  • 2009年6月4日 8:10if if 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     已答复

    I was doing the instrumentation after CxxIL Reader phase.
    The problem was that because my function returned a boolean, I used RegisterCondType for its return value and then used that in the compare instruction as a source. But turns out that the CompareInstruction requires sources to be of IntType.


    Regards,
    If If

    • 已标记为答案if if 2009年6月5日 6:27
    •