This is an archive of the discontinued LLVM Phabricator instance.

[asan] Replace vfork with fork.
ClosedPublic

Authored by eugenis on Mar 16 2018, 2:39 PM.

Details

Summary

vfork is not ASan-friendly because it modifies stack shadow in the
parent process address space. While it is possible to compensate for that with, for example,
__asan_handle_no_return before each call to _exit or execve and friends, simply replacing
vfork with fork looks like by far the easiest solution.

Posix compliant programs can not detect the difference between vfork and fork.

Fixes https://github.com/google/sanitizers/issues/925

Diff Detail

Repository
rL LLVM

Event Timeline

eugenis created this revision.Mar 16 2018, 2:39 PM
vitalybuka accepted this revision.Mar 16 2018, 2:42 PM
This revision is now accepted and ready to land.Mar 16 2018, 2:42 PM
This revision was automatically updated to reflect the committed changes.