This is an archive of the discontinued LLVM Phabricator instance.

[ASan] Move rss_limit_is_exceeded_ flag to ASan.
ClosedPublic

Authored by alekseyshl on Jun 13 2017, 3:39 PM.

Details

Summary

Move the OOM decision based on RSS limits out of generic allocator to
ASan allocator, where it makes more sense at the moment.

Diff Detail

Repository
rL LLVM

Event Timeline

alekseyshl created this revision.Jun 13 2017, 3:39 PM
kcc added a subscriber: kcc.Jun 13 2017, 3:51 PM

Why?
It would be lovely to have the same flag work in other sanitizers...

In D34180#779694, @kcc wrote:

Why?
It would be lovely to have the same flag work in other sanitizers...

Yep, other sanitizers need this functionality too, but the current way is pretty ugly (hinted by "bool check_rss_limit = false" parameter). I'd rather have the flag and the callback in sanitizer_allocator.cc, but first I'd like to finish changes addressing allocator_may_return_null issues (in a similar way, trying to move may_return_null_ flag out of the generic allocator) and then revisit RSS limit behavior.

kcc added a comment.Jun 13 2017, 4:35 PM

not sure I understand. you want to move this from common to asan and then back?

Nope, not back, but to sanitizer_allocator.cc. Not doing it right now since I want to see how may_return_null_ refactoring will turn out.

kcc accepted this revision.Jun 13 2017, 4:52 PM

LGTM

This revision is now accepted and ready to land.Jun 13 2017, 4:52 PM
This revision was automatically updated to reflect the committed changes.