首页>
外国专利>
Method for dynamically inserting code into a process by enabling taken branch traps to intercept a branch during the execution of the process
Method for dynamically inserting code into a process by enabling taken branch traps to intercept a branch during the execution of the process
展开▼
机译:通过使采用的分支陷阱在执行过程中拦截分支来动态地将代码插入到过程中的方法
展开▼
页面导航
摘要
著录项
相似文献
摘要
A method for dynamically inserting code or patching code during the running of a process on a computer is disclosed. The method comprises enabling taken branch traps on the process, intercepting a branch and redirecting processing of the branch instruction to a routine. The intercepting and redirecting may be done by a trap handler, which may respond to a plurality of branches or to any branches. The method may include rewriting a target of the branch instruction to a function call interceptor. The method may include processing the branch instruction after processing the routine. The routine may comprise a stub which might redirect processing to a wrapper function. The method may include avoiding any taken branches when the routine is active so that the method does not become recursive. The branch instruction may be provided with a completer that indicates whether more traps should be generated. The method may act as a profiler or a tracer. Also disclosed is a method of detecting stack or buffer overflows.
展开▼