Files
clang-p2996/compiler-rt/test/msan/backtrace.cc
Daniel Sanders 67f22ee24a [mips] XFAIL mips64el tests that fail on clang-cmake-mipsel
These tests were recently enabled and have never worked on this builder.

Three tests were sensitive to line number changes:
  test/msan/Linux/obstack.cc
  test/msan/chained_origin.cc
  test/msan/chained_origin_memcpy.cc
and this sensitivity will be addressed in a follow-up patch. Of these,
obstack.cc's sensitivity to line numbers is unexplained since it already uses
[[@LINE]].

llvm-svn: 278671
2016-08-15 15:14:08 +00:00

29 lines
538 B
C++

// RUN: %clangxx_msan -O0 %s -o %t && %run %t
// XFAIL: target-is-mips64el
#include <assert.h>
#include <execinfo.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
__attribute__((noinline))
void f() {
void *buf[10];
int sz = backtrace(buf, sizeof(buf) / sizeof(*buf));
assert(sz > 0);
for (int i = 0; i < sz; ++i)
if (!buf[i])
exit(1);
char **s = backtrace_symbols(buf, sz);
assert(s > 0);
for (int i = 0; i < sz; ++i)
printf("%d\n", (int)strlen(s[i]));
}
int main(void) {
f();
return 0;
}