This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] Abort after failed exec() and get rid of the allow_reexec ASan flag
ClosedPublic

Authored by kubamracek on Dec 21 2014, 3:39 PM.

Details

Reviewers
glider
Summary

As mentioned in https://code.google.com/p/address-sanitizer/issues/detail?id=365, when the re-exec that adds the required DYLD_INSERT_LIBRARIES variable fails, ASan currently continues to run, but things are broken (some memory can be overwritten, interceptors don't work, ...). This patch aborts if the execv() fails and prints an error message that DYLD_INSERT_LIBRARIES is required. It also removes the "alllow_reexec" flag, since using it causes the same issues.

Diff Detail

Event Timeline

kubamracek updated this revision to Diff 17542.Dec 21 2014, 3:39 PM
kubamracek retitled this revision from to [compiler-rt] Abort after failed exec() and get rid of the allow_reexec ASan flag.
kubamracek updated this object.
kubamracek edited the test plan for this revision. (Show Details)
kubamracek added subscribers: Unknown Object (MLST), samsonov, glider, kcc.
glider accepted this revision.Dec 22 2014, 1:18 AM
glider added a reviewer: glider.

LGTM. Thank you.

This revision is now accepted and ready to land.Dec 22 2014, 1:18 AM
kubamracek closed this revision.Dec 22 2014, 9:34 AM

Landed in r224712!