This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] Move IsStackOverflow from asan into sanitizer_common
ClosedPublic

Authored by vitalybuka on Sep 6 2017, 3:18 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

vitalybuka created this revision.Sep 6 2017, 3:18 PM
alekseyshl added inline comments.Sep 8 2017, 10:49 AM
compiler-rt/lib/sanitizer_common/sanitizer_posix.cc
324 ↗(On Diff #114082)

What about this #if?

compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc
218 ↗(On Diff #114082)

Looks like an unnecessary change

compiler-rt/lib/tsan/go/buildgo.sh
48 ↗(On Diff #114082)

What prompted it?

vitalybuka marked 2 inline comments as done.Sep 8 2017, 10:57 AM
vitalybuka added inline comments.
compiler-rt/lib/sanitizer_common/sanitizer_posix.cc
324 ↗(On Diff #114082)

#if allows to aviid sanitizer_platform_limits_posix.cc in lib/tsan/go/buildgo.sh

compiler-rt/lib/tsan/go/buildgo.sh
48 ↗(On Diff #114082)

IsStackOverflow needs some constants from the file.
I don't like #ifs in the code, but maybe safer just to keep them instead of new file here.
What would be your preference here?

vitalybuka marked an inline comment as done.

use #ifs instead of new cc files

alekseyshl added inline comments.Sep 8 2017, 11:07 AM
compiler-rt/lib/tsan/go/buildgo.sh
48 ↗(On Diff #114082)

Well, if we need IsStackOverflow in Go mode, we have to add this file, if we do not need IsStackOverflow (and, maybe, some other functions from sanitizer_posix.cc), we should split it out into a separate file and do not link it here.

vitalybuka marked 4 inline comments as done.Sep 8 2017, 11:09 PM
eugenis accepted this revision.Sep 11 2017, 1:29 PM
This revision is now accepted and ready to land.Sep 11 2017, 1:29 PM
This revision was automatically updated to reflect the committed changes.
vitalybuka reopened this revision.Sep 11 2017, 5:15 PM
This revision is now accepted and ready to land.Sep 11 2017, 5:15 PM
This revision was automatically updated to reflect the committed changes.