summaryrefslogtreecommitdiff
path: root/libunwind/test/unw_resume.pass.cpp
blob: 76273e4a8ef0a71d642380a58d7680b053606151 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

// Ensure that unw_resume() resumes execution at the stack frame identified by
// cursor.

// TODO: Investigate this failure on AIX system.
// XFAIL: target={{.*}}-aix{{.*}}

// TODO: Figure out why this fails with Memory Sanitizer.
// XFAIL: msan

#include <libunwind.h>

void test_unw_resume() {
  unw_context_t context;
  unw_cursor_t cursor;

  unw_getcontext(&context);
  unw_init_local(&cursor, &context);
  unw_step(&cursor);
  unw_resume(&cursor);
}

int main() {
  test_unw_resume();
  return 0;
}