Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time
CTraps for GCC-4.8, as published at CGO 2015.
    Copyright (C) 2012-2014 Brandon Lucia

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <>.

The accepted version of this paper is in this repository as ``paper.pdf''.
This is not the camera-ready version, but rather the accepted version with
author names added.

Build instructions for CGO Artifact Evaluation

This README will help you build the Last Writer Slices compiler pass and
runtime, and test them both on an included example program.  The output of the
test program shows the contents of the last writer table, which is the main
contribution of the paper.  README.orig describes the advanced features of this
system, such as how to build plugins (i.e., CTraps), and a few other features.
For a basic artifact evaluation, the most important component is the LWS
runtime described here.

This package was built and tested on OS X Mavericks, with homebrew installed.  First, clone the project from github:

0)$>git clone

To build the cloned project, there are a few prerequisites.

1)Install homebrew (
2)$>brew install gcc48

That will install g++-4.8, which is used to build the plugin.

Homebrew changed the name of the libiberty.h header that is required by the plugin infrastructure. That means we need to symlink the renamed homebrew one to the original name using this command:

$>ln -s `brew --prefix`/Cellar/gcc48/4.8.3/lib/gcc/x86_64-apple-darwin13.3.0/4.8.3/plugin/include/libiberty-4.8.h `brew --prefix`/Cellar/gcc48/4.8.3/lib/gcc/x86_64-apple-darwin13.3.0/4.8.3/plugin/include/libiberty.h

After that, things should build.

$>cd Compiler; make
$>cd ../Runtime; make

On my machine, this process produces a few bit-shift width warnings that are safe to ignore, but no other errors.

The next thing to do is build and run the test program in Test/test.c

$>cd ../Test; make; make run

This runs the test driver.  By default, the Last Writer Slices runtime is
configured with #define ARTIFACTEVAL.  The effect of this is that each time the
Last Writer Table is updated, the runtime prints the variable's address, thread
ID, and program counter of the update.  Normally, this information would be
accessible via gdb (or lldb), but for the sake of making evaluation easier,
I've opted to display the output for the artifact evaluator.


Last Writer Slicing: data provenance tracking for concurrent program debugging & analysis







No releases published


No packages published