Skip to content

Commit

Permalink
[ASan] fix test broken by argument promotion pass
Browse files Browse the repository at this point in the history
Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D148376
  • Loading branch information
fmayer committed Apr 14, 2023
1 parent d6d30dd commit 6d051ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion compiler-rt/test/asan/TestCases/use-after-scope-capture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ int main() {
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]]
// We cannot assert the line, after the argument promotion pass this crashes
// in the BOOM line below instead, when the ref gets turned into a value.
// CHECK: #0 0x{{.*}} in {{.*}}use-after-scope-capture.cpp
};
}
return f(); // BOOM
Expand Down

0 comments on commit 6d051ae

Please sign in to comment.