mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Michaël Zasso
ec02b811a8
|
8 years ago | |
---|---|---|
.. | ||
Makefile | 10 years ago | |
README | 12 years ago | |
bootstrap.sh | 10 years ago | |
download_gcmole_tools.py | 9 years ago | |
gccause.lua | 13 years ago | |
gcmole-tools.tar.gz.sha1 | 9 years ago | |
gcmole.cc | 10 years ago | |
gcmole.lua | 8 years ago | |
parallel.py | 10 years ago | |
run-gcmole.isolate | 8 years ago | |
run-gcmole.py | 9 years ago | |
run_gcmole.gyp | 8 years ago |
README
DESCRIPTION -------------------------------------------------------------------
gcmole is a simple static analysis tool used to find possible evaluation order
dependent GC-unsafe places in the V8 codebase.
For example the following code is GC-unsafe:
Handle<Object> Foo(); // Assume Foo can trigger a GC.
void Bar(Object*, Object*);
Handle<Object> baz;
baz->Qux(*Foo()); // (a)
Bar(*Foo(), *baz); // (b)
Both in cases (a) and (b) compiler is free to evaluate call arguments (that
includes receiver) in any order. That means it can dereference baz before
calling to Foo and save a raw pointer to a heap object in the register or
on the stack.
PREREQUISITES -----------------------------------------------------------------
1) Install Lua 5.1
2) Get LLVM 2.9 and Clang 2.9 sources and build them.
Follow the instructions on http://clang.llvm.org/get_started.html.
Make sure to pass --enable-optimized to configure to get Release build
instead of a Debug one.
3) Build gcmole Clang plugin (libgcmole.so)