Skip to content

Interference free region based Race detector using Intel MPX

Notifications You must be signed in to change notification settings

UsmanNadeem/mpxifr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

--------------------
IFRit - an interference-free-region based data race detection tool
Implementation by Laura Effinger-Dean and Brandon Lucia
-
Based on the ideas in the OOPSLA 2012 paper

IFRit: Interference-Free Regions for Dynamic Data-Race Detection 
  by Laura Effinger-Dean, Brandon Lucia, Luis Ceze, Dan Grossman, and Hans-J. Boehm
--------------------  

This repository includes:

(1) a copy of LLVM with a new pass that inserts data-race detection
  calls during compilation

(2) a runtime that actally implements those data-race detection
  calls

(3) A test program to check your setup.


---------------------------------

Compiler Pass Build pre-requisites:

1)Install LLVM (3.4?) from source
2)Install Clang, building against the LLVM you built in step (1)
3)Install CMake

Building the compiler pass:

	cd /path/to/ifrit/LLVM/IFRit
	make IFRITDIR=/home/linux/Desktop/IFRit  <-- <replace with your path> 

--
Runtime Build Pre-requisites:

1)Install glib-2

Building the runtime:
	cd /path/to/ifrit/Runtime
	make IFRITDIR=/home/linux/Desktop/IFRit  <-- <replace with your path> 

note that there are several #define build options in the Runtime source 

------------------------------------

Testing the setup:

$cd /path/to/ifrit/Test
-edit the Makefile in that directory so the paths point to your installation 
 of IFRIT and clang.  Note that you must use the same clang as the one 
 that you linked against the LLVM that you used to build the pass

	export LD_LIBRARY_PATH=/home/linux/Desktop/IFRit/Runtime:$LD_LIBRARY_PATH	 <-- <replace with your path>
	make IFRITDIR=/home/linux/Desktop/IFRit  	<-- <replace with your path> 
	./test.elf

You should then see some output like this.
[IFRit] Hash-table-based implementation in use.
[IFRit] Single-threaded optimization enabled.
[IFRit] Partitioning global state into 32 partitions.
Hello world
[IFRit] Sampling disabled
[IFRit] 6 6 : 0x40089a 0x40089a
Final value of x: 2000
[IFRit] Bye!

The 6 6 there is a race report saying that IFRs 6 and 6 overlapped.
The 0x40089a are the addresses of the line numbers.

$ addr2line -e test.elf 0x40089a
/sampa/home/effinger/drd/drd/test/test.c:10

Note that the compiler produces a file ifrs.txt containing a list of
IFRs detected in the code. The IFRit code just appends to this file,
so delete it before recompiling or you'll end up with a bunch of
redundant copies in the file.

About

Interference free region based Race detector using Intel MPX

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published