This is an archive of the discontinued LLVM Phabricator instance.

New MSan mapping layout (compiler-rt part)
ClosedPublic

Authored by eugenis on Oct 8 2015, 11:39 AM.

Details

Reviewers
samsonov
Summary

This is an implementation of https://github.com/google/sanitizers/issues/579

It has a number of advantages over the current mapping:

  • works for non-PIE executables
  • does not require ASLR; as a consequence, debugging MSan programs in gdb no longer requires "set disable-randomization off"
  • supports linux kernels >=4.1.2
  • the code is marginally faster and smaller

This is an ABI break. We never really promised ABI stability, but this patch includes a courtesy escape hatch: a compile-time macro that reverts back to the old mapping layout. The same macro will be used in the llvm part of the patch, their definitions have to match, of course.

Diff Detail

Repository
rL LLVM

Event Timeline

eugenis updated this revision to Diff 36881.Oct 8 2015, 11:39 AM
eugenis retitled this revision from to New MSan mapping layout (compiler-rt part).
eugenis updated this object.
eugenis added a reviewer: samsonov.
eugenis set the repository for this revision to rL LLVM.
eugenis added a subscriber: llvm-commits.
eugenis updated this revision to Diff 36887.Oct 8 2015, 11:55 AM
samsonov accepted this revision.Oct 8 2015, 1:25 PM
samsonov edited edge metadata.

LGTM

Incredibly cool!

This revision is now accepted and ready to land.Oct 8 2015, 1:25 PM
eugenis closed this revision.Oct 8 2015, 2:38 PM

r249754