This is an archive of the discontinued LLVM Phabricator instance.

[asan] Optimize strchr for strict_string_checks=false
ClosedPublic

Authored by vitalybuka on Apr 19 2017, 7:07 PM.

Event Timeline

vitalybuka created this revision.Apr 19 2017, 7:07 PM
eugenis added inline comments.Apr 20 2017, 11:21 AM
test/asan/TestCases/strchr_strict.c
51 ↗(On Diff #95988)

Returning a PROT_NONE page to the allocator sounds dangerous. Switch to mmap?

vitalybuka updated this revision to Diff 96008.Apr 20 2017, 1:37 PM

malloc to mmap

vitalybuka marked an inline comment as done.Apr 20 2017, 1:37 PM
vitalybuka updated this revision to Diff 96009.Apr 20 2017, 1:39 PM

allocate less memory in the test

eugenis accepted this revision.Apr 20 2017, 2:05 PM

LGTM

test/asan/TestCases/Posix/strchr.c
19

MAP_ANONYMOUS

This revision is now accepted and ready to land.Apr 20 2017, 2:05 PM
vitalybuka updated this revision to Diff 96014.Apr 20 2017, 2:07 PM
vitalybuka marked an inline comment as done.

MAP_ANONYMOUS

This revision was automatically updated to reflect the committed changes.
vitalybuka reopened this revision.Apr 21 2017, 12:49 PM
This revision is now accepted and ready to land.Apr 21 2017, 12:49 PM

Simplify test

This revision was automatically updated to reflect the committed changes.