From 0716fb9376c84edcc66103eb27f2c6465ea7868b Mon Sep 17 00:00:00 2001 From: Kostya Kortchinsky Date: Wed, 4 Apr 2018 20:03:16 +0000 Subject: [PATCH] [asan] Fix aligned_alloc test case Summary: Under some circumstances (that I haven't dug further into), the first stack frame for the test looks like: `#0 0x4e6038 in __interceptor_memalign.localalias.1 ...compiler-rt/lib/asan/asan_malloc_linux.cc:113` which isn't matched by the current CHECK. Expand the CHECK to match aligned_alloc or memalign. Hopefully this should fix the PowerPC issue as well, otherwise we'll bring back the FIXME. Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: srhines, kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D45281 llvm-svn: 329226 --- .../test/asan/TestCases/Linux/aligned_alloc-alignment.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/compiler-rt/test/asan/TestCases/Linux/aligned_alloc-alignment.cc b/compiler-rt/test/asan/TestCases/Linux/aligned_alloc-alignment.cc index 44d9de8c791f..10ce95fcd450 100644 --- a/compiler-rt/test/asan/TestCases/Linux/aligned_alloc-alignment.cc +++ b/compiler-rt/test/asan/TestCases/Linux/aligned_alloc-alignment.cc @@ -2,8 +2,7 @@ // RUN: %env_asan_opts=allocator_may_return_null=0 not %run %t 2>&1 | FileCheck %s // RUN: %env_asan_opts=allocator_may_return_null=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-NULL -// FIXME(alekseyshl): #0 frame does not look as expected on ppc64be, fix it. -// UNSUPPORTED: android,powerpc64 +// UNSUPPORTED: android // REQUIRES: stable-runtime @@ -15,7 +14,7 @@ extern void *aligned_alloc(size_t alignment, size_t size); int main() { void *p = aligned_alloc(17, 100); // CHECK: ERROR: AddressSanitizer: invalid allocation alignment: 17 - // CHECK: {{#0 0x.* in .*aligned_alloc}} + // CHECK: {{#0 0x.* in .*}}{{aligned_alloc|memalign}} // CHECK: {{#1 0x.* in main .*aligned_alloc-alignment.cc:}}[[@LINE-3]] // CHECK: SUMMARY: AddressSanitizer: invalid-allocation-alignment