theosotr / fsracer

Detecting fs-related data racers in JavaScript programs through dynamic binary instrumentation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FSRacer

A client that detects data races in file system resources on top of the DynamoRIO framework.

Setup

Install Dependencies

# Install GNU gengetopt to autogenerate command-line interface.
sudo apt install gengetopt

Download DynamoRIO

First, download the binary package of the DynamoRIO core:

wget -O dynamo.tar.gz https://github.com/DynamoRIO/dynamorio/releases/download/cronbuild-7.90.17998/DynamoRIO-x86_64-Linux-7.90.17998-0.tar.gz
tar -xvf dynamo.tar.gz

Build the patched Node binary

Build the patched Node binary from this repo by following the official instructions.

Build FSRacer

To build FSRacer run the following commands:

mkdir build
cd build
cmake -DTEST_BINARY_PATH=<path to the patched node binary> -DDynamoRIO_BUILD_DIR=<path to the build directory of DynamoRIO> ..
make

Note that the option -DTEST_BINARY_PATH corresponds to the path where the Node binary is located as produced by the previous step. On the other hand, the -DDynamoRIO_BUILD_DIR is the path to the directory where the installation of the DynamoRIO is placed.

Run FSRacer

Run the FSRacer client as follows:

<dynamorio binary> -c build/libfsracer.so -- <node binary> <node program>

Run tests through:

make test

About

Detecting fs-related data racers in JavaScript programs through dynamic binary instrumentation.


Languages

Language:C++ 84.5%Language:Shell 6.1%Language:CMake 5.0%Language:JavaScript 1.9%Language:Lex 1.2%Language:Python 0.7%Language:Dockerfile 0.7%