Giter VIP home page Giter VIP logo

trace-memcheck's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

trace-memcheck's Issues

[memcheck] Perform heap checking

Memcheck currently doesn't monitor the heap. Here is one way that it could.

Implement malloc, free, etc. in existing libc_memcheck library.
Turn around and call libc's malloc, but with larger sizes. Note: this will only work if it's deterministic for processes with the same parent. Assume it is for now.
Fill entire region in-core (just as with stack changes).
Record allocated regions in list.

At sequence point, check

  • Each thread's heap buffer end regions are 00's or ff's, respectively.

Problem: how should the custom memcheck implementation get initialized? It needs to know the pointer to the fill value, but tracer doesn't know how to get a pointer to memcheck's variable for that.
Possible solution: define CUSTOM SYSTEM CALLS, where eax is some unused number. This is hacky, but it should work. malloc() would check if a field is initialized; if not, it would make this synthetic system call.

[JIT] Handle traced process stops in scalable manner

Currently, the JIT engine waits on ALL traced processes to stop before handling the breakpoint. This is because it makes changes to the code blocks in all processes, which can cause inconsistencies and race conditions depending on where the tracee's PCs are.

One solution would be to have a shared queue of "patch" objects. A tracee stopped by a JIT-bkpt can cause the patcher to add a patch to the queue. Upon stopping, each tracee will check the queue for new patches. Once all threads have applied the patch, it'll be removed from the queue. (This can be tracked with an integer, e.g.)

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.