1 //===-- tsan_stack_trace.h --------------------------------------*- C++ -*-===//
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
6 //===----------------------------------------------------------------------===//
8 // This file is a part of ThreadSanitizer (TSan), a race detector.
10 //===----------------------------------------------------------------------===//
11 #ifndef TSAN_STACK_TRACE_H
12 #define TSAN_STACK_TRACE_H
14 #include "sanitizer_common/sanitizer_stacktrace.h"
15 #include "tsan_defs.h"
19 // StackTrace which calls malloc/free to allocate the buffer for
20 // addresses in stack traces.
21 struct VarSizeStackTrace
: public StackTrace
{
22 uptr
*trace_buffer
; // Owned.
26 void Init(const uptr
*pcs
, uptr cnt
, uptr extra_top_pc
= 0);
29 void ResizeBuffer(uptr new_size
);
31 VarSizeStackTrace(const VarSizeStackTrace
&);
32 void operator=(const VarSizeStackTrace
&);
37 #endif // TSAN_STACK_TRACE_H