This is an archive of the discontinued LLVM Phabricator instance.

[asan] Return allow_user_segv_handler=0 to fix compatibility issues.
ClosedPublic

Authored by vitalybuka on Jun 14 2017, 5:10 PM.

Details

Summary

After r303941 it was not possible to setup ASAN_OPTIONS to have the same
behavior for pre r303941 and post r303941 builds.
Pre r303941 Asan does not accept handle_sigbus=2.
Post r303941 Asan does not accept allow_user_segv_handler.

This fix ignores allow_user_segv_handler=1, but for allow_user_segv_handler=0
it will upgrade flags like handle_sigbus=1 to handle_sigbus=2. So user can set
ASAN_OPTIONS=allow_user_segv_handler=0 and have same behavior on old and new
clang builds (except range from r303941 to this revision).

In future users which need to prevent third party handlers should switch to
handle_sigbus=2 and remove allow_user_segv_handler as soon as suport of older
builds is not needed.

Related bugs:

https://github.com/google/oss-fuzz/issues/675
https://bugs.chromium.org/p/chromium/issues/detail?id=731130

Diff Detail

Repository
rL LLVM

Event Timeline

vitalybuka created this revision.Jun 14 2017, 5:10 PM

Updated test

eugenis accepted this revision.Jun 14 2017, 5:16 PM

LGTM

This revision is now accepted and ready to land.Jun 14 2017, 5:16 PM
This revision was automatically updated to reflect the committed changes.