Help with Assertion failuresHello all,<br/>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.<br/>I'm getting the following error in the process. Can somebody please suggest or give and idea of where I might be wrong. <br/><br/>-------------------------------------------------------------------------<br/><br/>Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\targets\architectures\x86\function-linkage.cpp, Line 374<br/>  Unreached<br/>  in (Function number 2) _main [line 28] during Lower<br/>  in (Module) ../testFiles/testFunc.c<br/>Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\phx\ir\ir.cpp, Line 10578<br/>  reg != nullptr : SinkDestinationToRegister should only be used with a valid register<br/>  in (Function number 2) _main [line 28] during Lower<br/>  in (Module) ../testFiles/testFunc.c<br/>Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\phx\ir\ir-constructor.cpp, Line 484<br/>  variableOperand-&gt;IsTemporaryRegister<br/>  in (Function number 2) _main [line 28] during Lower<br/>  in (Module) ../testFiles/testFunc.c<br/>Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\targets\architectures\x86\lower.cpp, Line 515<br/>  Unreached : Unhandled Assign<br/>   tv290-(RegisterCandidate) = ASSIGN t302                                  #28<br/>  in (Function number 2) _main [line 28] during Lower<br/>  in (Module) ../testFiles/testFunc.c<br/>Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\targets\runtimes\base\lower.cpp, Line 1458<br/>  (nextInstruction != nullptr) : Custom processing did not return next instruction to process<br/>  in (Function number 2) _main [line 28] during Lower<br/>  in (Module) ../testFiles/testFunc.c<br/>Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\targets\runtimes\base\lower.cpp, Line 1481<br/>  previousInstruction != nullptr : Lower expansion is skipping instructions<br/>   tv290-(RegisterCandidate) = ASSIGN t302                                  #28<br/>  in (Function number 2) _main [line 28] during Lower<br/>  in (Module) ../testFiles/testFunc.c<br/>Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\targets\runtimes\base\lower.cpp, Line 1546<br/>  newInstruction-&gt;IsPseudo || newInstruction-&gt;WasLegalized || !newInstruction-&gt;IsLir || newInstruction-&gt;IsCommon : Customized expansion not f<br/>ull legalized, call Lower-&gt;Range<br/>   ESP               = add ESP, 4                                           #28<br/>  in (Function number 2) _main [line 28] during Lower<br/>  in (Module) ../testFiles/testFunc.c<br/>fatal error C1001: An internal error has occurred in the compiler.<br/>(compiler file 'd:\enlistments\sdk_june08\src\clients\c2\c2-diagnostics.cpp', line 704)<br/>Access Violation Fault (instruction at &quot;0x303B99D9&quot; read memory at &quot;0x0000000C&quot;)<br/>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<br/>osoft later.<br/><br/>-------------------------------------------------------------------------<br/><br/><br/>Regards,<br/>If If© 2009 Microsoft Corporation. All rights reserved.Fri, 05 Jun 2009 06:27:21 Z7e564311-adec-4648-932c-6e657c0a1ff1http://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/7e564311-adec-4648-932c-6e657c0a1ff1#7e564311-adec-4648-932c-6e657c0a1ff1http://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/7e564311-adec-4648-932c-6e657c0a1ff1#7e564311-adec-4648-932c-6e657c0a1ff1if ifhttp://social.msdn.microsoft.com/Profile/en-US/?user=if%20ifHelp with Assertion failuresHello all,<br/>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.<br/>I'm getting the following error in the process. Can somebody please suggest or give and idea of where I might be wrong. <br/><br/>-------------------------------------------------------------------------<br/><br/>Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\targets\architectures\x86\function-linkage.cpp, Line 374<br/>  Unreached<br/>  in (Function number 2) _main [line 28] during Lower<br/>  in (Module) ../testFiles/testFunc.c<br/>Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\phx\ir\ir.cpp, Line 10578<br/>  reg != nullptr : SinkDestinationToRegister should only be used with a valid register<br/>  in (Function number 2) _main [line 28] during Lower<br/>  in (Module) ../testFiles/testFunc.c<br/>Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\phx\ir\ir-constructor.cpp, Line 484<br/>  variableOperand-&gt;IsTemporaryRegister<br/>  in (Function number 2) _main [line 28] during Lower<br/>  in (Module) ../testFiles/testFunc.c<br/>Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\targets\architectures\x86\lower.cpp, Line 515<br/>  Unreached : Unhandled Assign<br/>   tv290-(RegisterCandidate) = ASSIGN t302                                  #28<br/>  in (Function number 2) _main [line 28] during Lower<br/>  in (Module) ../testFiles/testFunc.c<br/>Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\targets\runtimes\base\lower.cpp, Line 1458<br/>  (nextInstruction != nullptr) : Custom processing did not return next instruction to process<br/>  in (Function number 2) _main [line 28] during Lower<br/>  in (Module) ../testFiles/testFunc.c<br/>Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\targets\runtimes\base\lower.cpp, Line 1481<br/>  previousInstruction != nullptr : Lower expansion is skipping instructions<br/>   tv290-(RegisterCandidate) = ASSIGN t302                                  #28<br/>  in (Function number 2) _main [line 28] during Lower<br/>  in (Module) ../testFiles/testFunc.c<br/>Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\targets\runtimes\base\lower.cpp, Line 1546<br/>  newInstruction-&gt;IsPseudo || newInstruction-&gt;WasLegalized || !newInstruction-&gt;IsLir || newInstruction-&gt;IsCommon : Customized expansion not f<br/>ull legalized, call Lower-&gt;Range<br/>   ESP               = add ESP, 4                                           #28<br/>  in (Function number 2) _main [line 28] during Lower<br/>  in (Module) ../testFiles/testFunc.c<br/>fatal error C1001: An internal error has occurred in the compiler.<br/>(compiler file 'd:\enlistments\sdk_june08\src\clients\c2\c2-diagnostics.cpp', line 704)<br/>Access Violation Fault (instruction at &quot;0x303B99D9&quot; read memory at &quot;0x0000000C&quot;)<br/>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<br/>osoft later.<br/><br/>-------------------------------------------------------------------------<br/><br/><br/>Regards,<br/>If IfFri, 29 May 2009 09:22:14 Z2009-05-29T09:22:14Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/7e564311-adec-4648-932c-6e657c0a1ff1#f33b1009-2e04-49e3-9b25-333204bc2551http://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/7e564311-adec-4648-932c-6e657c0a1ff1#f33b1009-2e04-49e3-9b25-333204bc2551Andy Ayers - MSFThttp://social.msdn.microsoft.com/Profile/en-US/?user=Andy%20Ayers%20-%20MSFTHelp with Assertion failuresWhen (where in the phase list) are you doing instrumentation?<hr class="sig">Architect - Microsoft Phoenix ProjectWed, 03 Jun 2009 16:42:47 Z2009-06-03T16:42:47Zhttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/7e564311-adec-4648-932c-6e657c0a1ff1#7441e831-b7b9-43bf-9e16-f3d11905956ahttp://social.msdn.microsoft.com/Forums/en-US/phoenix/thread/7e564311-adec-4648-932c-6e657c0a1ff1#7441e831-b7b9-43bf-9e16-f3d11905956aif ifhttp://social.msdn.microsoft.com/Profile/en-US/?user=if%20ifHelp with Assertion failures<p>I was doing the instrumentation after CxxIL Reader phase. <br/>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. <br/><br/><br/>Regards,<br/>If If</p>Thu, 04 Jun 2009 08:10:55 Z2009-06-04T08:10:55Z