| | | | --- | --- | | Bugzilla Link | [52187](https://llvm.org/bz52187) | | Version | unspecified | | OS | Windows NT | | Attachments | [use-after-scope-capture.cpp](https://user-images.githubusercontent.com/1668084/143762642-4ca21896-bb68-4ff7-8a8b-f1a98d5536fa.gz) | | CC | @aeubanks,@dwblaikie,@jmorse,@pogo59,@pogo59 | ## Extended Description Asan's test case use-after-scope-capture.cpp fails if -ffunction-sections -gdwarf-aranges and new pm is enabled. The test is failing as the stack trace does not contain line number anymore. >--------- #include <functional> int main() { std::function<int()> f; { int x = 0; f = [&x]() __attribute__((noinline)) { return x; // BOOM // CHECK: ERROR: AddressSanitizer: stack-use-after-scope // CHECK: #​0 0x{{.*}} in {{.*}}use-after-scope-capture.cpp:[[@LINE-2]] }; } return f(); // BOOM } -----------< llvm-symbolizer-output: >-------------------- $ clang++ -ffunction-sections -gdwarf-aranges -gline-tables-only -O1 use-after-scope-capture.cpp && llvm-nm a.out --print-size -C | grep operator | cut -d" " -f1 | sed 's/^/0x/' | xargs llvm-symbolizer -e a.out main::$_0::operator()() const use-after-scope-capture.cpp:0:0 -------------------<