Adding a basic LLVM pass

computer simgrid llvm compilation assembly x86_64

The SimGrid model checker uses memory introspection (of the heap, stack and global variables) in order to detect the equality of the state of a distributed application at the different nodes of its execution graph. One difficulty is to deal with uninitialised variables. The uninitialised global variables are usually not a big problem as their initial value is 0. The heap variables are dealt with by memseting to 0 the content of the buffers returned by malloc and friends. The case of uninitialised stack variables is more problematic as their value is whatever was at this place on the stack before. In order to evaluate the impact of those uninitialised variables, we would like to clean each stack frame before using them. This could be done with a LLVM plugin. Here's my first attempt to write a LLVM pass to modify the code of a function.

Read more…

Page 1 of 1 | | Next page | JSON Feed | Atom Feed