This is an archive of the discontinued LLVM Phabricator instance.

Mark lambda in use-after-scope-capture.cpp as noinline
ClosedPublic

Authored by aeubanks on Jun 4 2020, 1:20 PM.

Details

Summary

As explained in https://bugs.llvm.org/show_bug.cgi?id=46208,
symbolization on Windows after inlining and around
lambdas/std::functions doesn't work very well. Under the new pass
manager, there is inlining at -O1.
use-after-scope-capture.cpp checks that the symbolization points to the
line containing "return x;", but the combination of
Windows/inlining/lambdas makes the symbolization point to the line
"f = [&x]() {".

Mark the lambda as noinline since this test is not a test for
symbolization.

Diff Detail

Event Timeline

aeubanks created this revision.Jun 4 2020, 1:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 4 2020, 1:20 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
aeubanks retitled this revision from Mark lambda in use-after-scope-capture.cpp as noinline to Mark lambda in use-after-scope-capture.cpp as noinline on Windows.Jun 4 2020, 1:32 PM
vitalybuka accepted this revision.Jun 5 2020, 3:20 AM
vitalybuka added inline comments.
compiler-rt/test/asan/TestCases/use-after-scope-capture.cpp
6

it's not a test for symbolizer
so maybe just use noinline everywhere without any TODO

This revision is now accepted and ready to land.Jun 5 2020, 3:20 AM
aeubanks updated this revision to Diff 268825.Jun 5 2020, 8:52 AM

Always mark lambda noinline

aeubanks retitled this revision from Mark lambda in use-after-scope-capture.cpp as noinline on Windows to Mark lambda in use-after-scope-capture.cpp as noinline.Jun 5 2020, 8:52 AM
aeubanks edited the summary of this revision. (Show Details)
This revision was automatically updated to reflect the committed changes.