Practical Initialization Race Detection for JavaScript Web Applications
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
mitmproxy
report
src
test
third-party
.gitignore
README.md
fortune-top-100.sh
initracer.js
motivating-examples.sh
package.json
protractor_conf.js
run-experiments.sh
run-tests.sh
spec.js
tests.sh

README.md

InitRacer

Setup

The following install instructions have been tested on Ubuntu 16.04.1.

Dependencies

  1. Install Google Chrome from https://www.google.com/chrome

  2. Install other dependencies by issuing the following commands:

    curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
    sudo apt-get install -y git nodejs python-pip python-dev libffi-dev libssl-dev libxml2-dev libxslt1-dev libjpeg8-dev zlib1g-dev g++
    sudo npm install -g http-server protractor@5.0.0
    sudo webdriver-manager update
    pip install mitmproxy==0.17
    
  3. Install mitmproxy certificate

    A. Start mitmproxy by issuing: mitmdump

    B. Open http://mitm.it/ in Google Chrome by issuing:

    google-chrome-stable http://mitm.it/ --proxy-server="127.0.0.1:8080"
    

    C. Download the mitmproxy certificate for Ubuntu by clicking on "Other"

    D. Install the mitmproxy certificate: Open chrome://settings/certificates in Google Chrome, click on "Authorities", and import the certificiate mitmproxy-ca-cert.pem. In addition, issue the following commands.

    sudo cp ~/Downloads/mitmproxy-ca-cert.pem /usr/local/share/ca-certificates/mitmproxy-ca-cert.crt
    sudo update-ca-certificates
    

    Test that the mitmproxy certificate is installed correctly, by repeating steps (A) and (B), and opening https://github.com/cs-au-dk/initracer in the browser.

InitRacer

Issue the following commands:

git clone https://github.com/cs-au-dk/initracer.git
cd initracer
npm install

Usage

The following command runs InitRacer on http://localhost:8080/test/access-before-definition/dropdown/index.html, and saves the result in out/example/:

http-server # for serving the test/ directory
./initracer.js --site example --url http://localhost:8080/test/access-before-definition/dropdown/index.html --validate

The report generated by InitRacer can be found at http://localhost:8080/report/.

Running all tests: Issue the command ./run-tests.sh and open http://localhost:8080/report/.

Running all experiments:

Download and extract the recordings of the websites of the 100 largest companies from the Fortune 500 list by issuing the following commands:

wget http://initracer.casadev.cs.au.dk/recordings.zip
unzip recordings.zip

Then issue the command ./run-experiments.sh and open http://localhost:8080/report/.