none
ILRewriting : The process was terminated due to an internal error in the .NET Runtime at IP 000007F840A98CB6 (000007F840A20000) with exit code 80131506. RRS feed

  • Question

  • I am trying to inject my helper function definitions that resides in a security safe critical assembly from unmanaged code during JITCompilationStarted callback function. I use COR_PRF_DISABLE_TRANSPARENCY_CHECKS_UNDER_FULL_TRUST to inject into security transparent functions from the answer in my previous question. 

    I am injecting the function definition in the functions of System.Web.dll and also i tried to inject in all the module "System.*". But my profiler is making the web application to crash. 

    "The process was terminated due to an internal error in the .NET Runtime at IP 000007F840A98CB6 (000007F840A20000) with exit code 80131506." 

    The error above was the collected from event viewer. I guess while calling the injected function definition the web application crashes. Can i know what is the reason for it.? how should i do it further ? how only should i instrument and call my helper function definition from the running web application.? 

    My reference project is is ILRewrite10 in  http://clrprofiler.codeplex.com/releases/view/97738 

    Thursday, February 5, 2015 10:21 AM

Answers

  • The crash happens while trying to inject into System.AppDomain class's function and then into functions that start with get_* and set_* (the properties related function). I filtered those alone, now it is working fine.
    Monday, February 9, 2015 11:56 AM

All replies

  • Hello,

    >> Can i know what is the reason for it.?

    From your description, it seems that you are trying to inject unmanaged code to .net assembly, I am wondering if this behavior causes the GC dereferences some objects so that it would cause this exception, for details, you could check this KB article, and if you are using .NET 4.0, you could ask for a hotfix about this issue:

    https://support.microsoft.com/kb/2640103/?wa=wsignin1.0

    You could have a try to debug it with following blogs:

    How to debug application crash/hang in production environment?

    Using Windows Event Viewer to debug crashes

    >> how should i do it further ? how only should i instrument and call my helper function definition from the running web application.?

    You could check this thread which seems discuss the same topic might be helpful:

    How to Inject code in c# method calls from a separate app

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, February 6, 2015 2:34 AM
    Moderator
  • The crash happens while trying to inject into System.AppDomain class's function and then into functions that start with get_* and set_* (the properties related function). I filtered those alone, now it is working fine.
    Monday, February 9, 2015 11:56 AM