2019-08-14 10:47:11 +02:00
|
|
|
//===-- sanitizer_stacktrace_libcdep.cpp ----------------------------------===//
|
2013-12-05 10:18:38 +01:00
|
|
|
//
|
2019-08-14 10:47:11 +02:00
|
|
|
// 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
|
2013-12-05 10:18:38 +01:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file is shared between AddressSanitizer and ThreadSanitizer
|
|
|
|
// run-time libraries.
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-05-22 09:09:21 +02:00
|
|
|
#include "sanitizer_common.h"
|
2014-11-13 21:41:38 +01:00
|
|
|
#include "sanitizer_placement_new.h"
|
2013-12-05 10:18:38 +01:00
|
|
|
#include "sanitizer_stacktrace.h"
|
2014-11-13 21:41:38 +01:00
|
|
|
#include "sanitizer_stacktrace_printer.h"
|
2014-05-22 09:09:21 +02:00
|
|
|
#include "sanitizer_symbolizer.h"
|
2013-12-05 10:18:38 +01:00
|
|
|
|
|
|
|
namespace __sanitizer {
|
|
|
|
|
2014-11-13 21:41:38 +01:00
|
|
|
void StackTrace::Print() const {
|
|
|
|
if (trace == nullptr || size == 0) {
|
2014-05-22 09:09:21 +02:00
|
|
|
Printf(" <empty stack>\n\n");
|
|
|
|
return;
|
|
|
|
}
|
2021-05-12 14:37:22 +02:00
|
|
|
InternalScopedString frame_desc;
|
|
|
|
InternalScopedString dedup_token;
|
2016-11-08 23:04:09 +01:00
|
|
|
int dedup_frames = common_flags()->dedup_token_length;
|
2020-10-16 10:03:04 +02:00
|
|
|
bool symbolize = RenderNeedsSymbolization(common_flags()->stack_trace_format);
|
2014-05-22 09:09:21 +02:00
|
|
|
uptr frame_num = 0;
|
2014-11-13 21:41:38 +01:00
|
|
|
for (uptr i = 0; i < size && trace[i]; i++) {
|
2014-05-22 09:09:21 +02:00
|
|
|
// PCs in stack traces are actually the return addresses, that is,
|
|
|
|
// addresses of the next instructions after the call.
|
2014-11-13 21:41:38 +01:00
|
|
|
uptr pc = GetPreviousInstructionPc(trace[i]);
|
2020-10-16 10:03:04 +02:00
|
|
|
SymbolizedStack *frames;
|
|
|
|
if (symbolize)
|
|
|
|
frames = Symbolizer::GetOrInit()->SymbolizePC(pc);
|
|
|
|
else
|
|
|
|
frames = SymbolizedStack::New(pc);
|
2015-10-21 09:32:45 +02:00
|
|
|
CHECK(frames);
|
|
|
|
for (SymbolizedStack *cur = frames; cur; cur = cur->next) {
|
2014-05-22 09:09:21 +02:00
|
|
|
frame_desc.clear();
|
2014-11-13 21:41:38 +01:00
|
|
|
RenderFrame(&frame_desc, common_flags()->stack_trace_format, frame_num++,
|
2020-10-16 10:03:04 +02:00
|
|
|
cur->info.address, symbolize ? &cur->info : nullptr,
|
|
|
|
common_flags()->symbolize_vs_style,
|
2015-10-21 09:32:45 +02:00
|
|
|
common_flags()->strip_path_prefix);
|
2014-05-22 09:09:21 +02:00
|
|
|
Printf("%s\n", frame_desc.data());
|
2016-11-08 23:04:09 +01:00
|
|
|
if (dedup_frames-- > 0) {
|
|
|
|
if (dedup_token.length())
|
|
|
|
dedup_token.append("--");
|
ubsan.c (ubsan_expand_null_ifn): Use _v1 suffixed type mismatch builtins...
* ubsan.c (ubsan_expand_null_ifn): Use _v1 suffixed type mismatch
builtins, store max (log2 (align), 0) into uchar field instead of
align into uptr field.
(ubsan_expand_objsize_ifn): Use _v1 suffixed type mismatch builtins,
store uchar 0 field instead of uptr 0 field.
(instrument_nonnull_return): Use _v1 suffixed nonnull return builtin,
instead of passing one address of struct with 2 locations pass
two addresses of structs with 1 location each.
* sanitizer.def (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH,
BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_ABORT,
BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN,
BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_ABORT): Removed.
(BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1,
BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1_ABORT,
BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1,
BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1_ABORT): New builtins.
* c-c++-common/ubsan/float-cast-overflow-1.c: Drop value keyword
from expected output regexps.
* c-c++-common/ubsan/float-cast-overflow-2.c: Likewise.
* c-c++-common/ubsan/float-cast-overflow-3.c: Likewise.
* c-c++-common/ubsan/float-cast-overflow-4.c: Likewise.
* c-c++-common/ubsan/float-cast-overflow-5.c: Likewise.
* c-c++-common/ubsan/float-cast-overflow-6.c: Likewise.
* c-c++-common/ubsan/float-cast-overflow-8.c: Likewise.
* c-c++-common/ubsan/float-cast-overflow-9.c: Likewise.
* c-c++-common/ubsan/float-cast-overflow-10.c: Likewise.
* g++.dg/ubsan/float-cast-overflow-bf.C: Likewise.
* gcc.dg/ubsan/float-cast-overflow-bf.c: Likewise.
* g++.dg/asan/default-options-1.C (__asan_default_options): Add
used attribute.
* g++.dg/asan/asan_test.C: Run with ASAN_OPTIONS=handle_segv=2
in the environment.
* All source files: Merge from upstream 315899.
* asan/Makefile.am (nodist_saninclude_HEADERS): Add
include/sanitizer/tsan_interface.h.
* asan/libtool-version: Bump the libasan SONAME.
* lsan/Makefile.am (sanitizer_lsan_files): Add lsan_common_mac.cc.
(lsan_files): Add lsan_linux.cc, lsan_mac.cc and lsan_malloc_mac.cc.
* sanitizer_common/Makefile.am (sanitizer_common_files): Add
sancov_flags.cc, sanitizer_allocator_checks.cc,
sanitizer_coverage_libcdep_new.cc, sanitizer_errno.cc,
sanitizer_file.cc, sanitizer_mac_libcdep.cc and
sanitizer_stoptheworld_mac.cc. Remove sanitizer_coverage_libcdep.cc
and sanitizer_coverage_mapping_libcdep.cc.
* tsan/Makefile.am (tsan_files): Add tsan_external.cc.
* ubsan/Makefile.am (DEFS): Add -DUBSAN_CAN_USE_CXXABI=1.
(ubsan_files): Add ubsan_init_standalone.cc and
ubsan_signals_standalone.cc.
* ubsan/libtool-version: Bump the libubsan SONAME.
* asan/Makefile.in: Regenerate.
* lsan/Makefile.in: Regenerate.
* sanitizer_common/Makefile.in: Regenerate.
* tsan/Makefile.in: Regenerate.
* ubsan/Makefile.in: Regenerate.
From-SVN: r253887
2017-10-19 13:23:59 +02:00
|
|
|
if (cur->info.function != nullptr)
|
|
|
|
dedup_token.append(cur->info.function);
|
2016-11-08 23:04:09 +01:00
|
|
|
}
|
2014-05-22 09:09:21 +02:00
|
|
|
}
|
2015-10-21 09:32:45 +02:00
|
|
|
frames->ClearAll();
|
2014-05-22 09:09:21 +02:00
|
|
|
}
|
|
|
|
// Always print a trailing empty line after stack trace.
|
|
|
|
Printf("\n");
|
2016-11-08 23:04:09 +01:00
|
|
|
if (dedup_token.length())
|
|
|
|
Printf("DEDUP_TOKEN: %s\n", dedup_token.data());
|
2014-05-22 09:09:21 +02:00
|
|
|
}
|
|
|
|
|
2015-10-21 09:32:45 +02:00
|
|
|
void BufferedStackTrace::Unwind(u32 max_depth, uptr pc, uptr bp, void *context,
|
2014-11-13 21:41:38 +01:00
|
|
|
uptr stack_top, uptr stack_bottom,
|
|
|
|
bool request_fast_unwind) {
|
2019-08-14 10:47:11 +02:00
|
|
|
// Ensures all call sites get what they requested.
|
|
|
|
CHECK_EQ(request_fast_unwind, WillUseFastUnwind(request_fast_unwind));
|
2014-05-22 09:09:21 +02:00
|
|
|
top_frame_bp = (max_depth > 0) ? bp : 0;
|
|
|
|
// Avoid doing any work for small max_depth.
|
|
|
|
if (max_depth == 0) {
|
|
|
|
size = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (max_depth == 1) {
|
|
|
|
size = 1;
|
2014-11-13 21:41:38 +01:00
|
|
|
trace_buffer[0] = pc;
|
2014-05-22 09:09:21 +02:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (!WillUseFastUnwind(request_fast_unwind)) {
|
2015-10-21 09:32:45 +02:00
|
|
|
#if SANITIZER_CAN_SLOW_UNWIND
|
2014-05-22 09:09:21 +02:00
|
|
|
if (context)
|
2019-08-14 10:47:11 +02:00
|
|
|
UnwindSlow(pc, context, max_depth);
|
2014-05-22 09:09:21 +02:00
|
|
|
else
|
2019-08-14 10:47:11 +02:00
|
|
|
UnwindSlow(pc, max_depth);
|
2015-10-21 09:32:45 +02:00
|
|
|
#else
|
|
|
|
UNREACHABLE("slow unwind requested but not available");
|
|
|
|
#endif
|
2014-05-22 09:09:21 +02:00
|
|
|
} else {
|
2019-08-14 10:47:11 +02:00
|
|
|
UnwindFast(pc, bp, stack_top, stack_bottom, max_depth);
|
2014-05-22 09:09:21 +02:00
|
|
|
}
|
2013-12-05 10:18:38 +01:00
|
|
|
}
|
|
|
|
|
ubsan.c (ubsan_expand_null_ifn): Use _v1 suffixed type mismatch builtins...
* ubsan.c (ubsan_expand_null_ifn): Use _v1 suffixed type mismatch
builtins, store max (log2 (align), 0) into uchar field instead of
align into uptr field.
(ubsan_expand_objsize_ifn): Use _v1 suffixed type mismatch builtins,
store uchar 0 field instead of uptr 0 field.
(instrument_nonnull_return): Use _v1 suffixed nonnull return builtin,
instead of passing one address of struct with 2 locations pass
two addresses of structs with 1 location each.
* sanitizer.def (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH,
BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_ABORT,
BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN,
BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_ABORT): Removed.
(BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1,
BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1_ABORT,
BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1,
BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1_ABORT): New builtins.
* c-c++-common/ubsan/float-cast-overflow-1.c: Drop value keyword
from expected output regexps.
* c-c++-common/ubsan/float-cast-overflow-2.c: Likewise.
* c-c++-common/ubsan/float-cast-overflow-3.c: Likewise.
* c-c++-common/ubsan/float-cast-overflow-4.c: Likewise.
* c-c++-common/ubsan/float-cast-overflow-5.c: Likewise.
* c-c++-common/ubsan/float-cast-overflow-6.c: Likewise.
* c-c++-common/ubsan/float-cast-overflow-8.c: Likewise.
* c-c++-common/ubsan/float-cast-overflow-9.c: Likewise.
* c-c++-common/ubsan/float-cast-overflow-10.c: Likewise.
* g++.dg/ubsan/float-cast-overflow-bf.C: Likewise.
* gcc.dg/ubsan/float-cast-overflow-bf.c: Likewise.
* g++.dg/asan/default-options-1.C (__asan_default_options): Add
used attribute.
* g++.dg/asan/asan_test.C: Run with ASAN_OPTIONS=handle_segv=2
in the environment.
* All source files: Merge from upstream 315899.
* asan/Makefile.am (nodist_saninclude_HEADERS): Add
include/sanitizer/tsan_interface.h.
* asan/libtool-version: Bump the libasan SONAME.
* lsan/Makefile.am (sanitizer_lsan_files): Add lsan_common_mac.cc.
(lsan_files): Add lsan_linux.cc, lsan_mac.cc and lsan_malloc_mac.cc.
* sanitizer_common/Makefile.am (sanitizer_common_files): Add
sancov_flags.cc, sanitizer_allocator_checks.cc,
sanitizer_coverage_libcdep_new.cc, sanitizer_errno.cc,
sanitizer_file.cc, sanitizer_mac_libcdep.cc and
sanitizer_stoptheworld_mac.cc. Remove sanitizer_coverage_libcdep.cc
and sanitizer_coverage_mapping_libcdep.cc.
* tsan/Makefile.am (tsan_files): Add tsan_external.cc.
* ubsan/Makefile.am (DEFS): Add -DUBSAN_CAN_USE_CXXABI=1.
(ubsan_files): Add ubsan_init_standalone.cc and
ubsan_signals_standalone.cc.
* ubsan/libtool-version: Bump the libubsan SONAME.
* asan/Makefile.in: Regenerate.
* lsan/Makefile.in: Regenerate.
* sanitizer_common/Makefile.in: Regenerate.
* tsan/Makefile.in: Regenerate.
* ubsan/Makefile.in: Regenerate.
From-SVN: r253887
2017-10-19 13:23:59 +02:00
|
|
|
static int GetModuleAndOffsetForPc(uptr pc, char *module_name,
|
|
|
|
uptr module_name_len, uptr *pc_offset) {
|
|
|
|
const char *found_module_name = nullptr;
|
|
|
|
bool ok = Symbolizer::GetOrInit()->GetModuleNameAndOffsetForPC(
|
|
|
|
pc, &found_module_name, pc_offset);
|
|
|
|
|
|
|
|
if (!ok) return false;
|
|
|
|
|
|
|
|
if (module_name && module_name_len) {
|
|
|
|
internal_strncpy(module_name, found_module_name, module_name_len);
|
|
|
|
module_name[module_name_len - 1] = '\x00';
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2013-12-05 10:18:38 +01:00
|
|
|
} // namespace __sanitizer
|
2016-11-08 23:04:09 +01:00
|
|
|
using namespace __sanitizer;
|
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void __sanitizer_symbolize_pc(uptr pc, const char *fmt, char *out_buf,
|
|
|
|
uptr out_buf_size) {
|
|
|
|
if (!out_buf_size) return;
|
|
|
|
pc = StackTrace::GetPreviousInstructionPc(pc);
|
2020-10-16 10:03:04 +02:00
|
|
|
SymbolizedStack *frame;
|
|
|
|
bool symbolize = RenderNeedsSymbolization(fmt);
|
|
|
|
if (symbolize)
|
|
|
|
frame = Symbolizer::GetOrInit()->SymbolizePC(pc);
|
|
|
|
else
|
|
|
|
frame = SymbolizedStack::New(pc);
|
2016-11-08 23:04:09 +01:00
|
|
|
if (!frame) {
|
|
|
|
internal_strncpy(out_buf, "<can't symbolize>", out_buf_size);
|
|
|
|
out_buf[out_buf_size - 1] = 0;
|
|
|
|
return;
|
|
|
|
}
|
2021-05-12 14:37:22 +02:00
|
|
|
InternalScopedString frame_desc;
|
2018-10-31 12:14:23 +01:00
|
|
|
uptr frame_num = 0;
|
|
|
|
// Reserve one byte for the final 0.
|
|
|
|
char *out_end = out_buf + out_buf_size - 1;
|
|
|
|
for (SymbolizedStack *cur = frame; cur && out_buf < out_end;
|
|
|
|
cur = cur->next) {
|
|
|
|
frame_desc.clear();
|
2020-10-16 10:03:04 +02:00
|
|
|
RenderFrame(&frame_desc, fmt, frame_num++, cur->info.address,
|
|
|
|
symbolize ? &cur->info : nullptr,
|
2018-10-31 12:14:23 +01:00
|
|
|
common_flags()->symbolize_vs_style,
|
|
|
|
common_flags()->strip_path_prefix);
|
|
|
|
if (!frame_desc.length())
|
|
|
|
continue;
|
|
|
|
// Reserve one byte for the terminating 0.
|
|
|
|
uptr n = out_end - out_buf - 1;
|
|
|
|
internal_strncpy(out_buf, frame_desc.data(), n);
|
|
|
|
out_buf += __sanitizer::Min<uptr>(n, frame_desc.length());
|
|
|
|
*out_buf++ = 0;
|
|
|
|
}
|
|
|
|
CHECK(out_buf <= out_end);
|
|
|
|
*out_buf = 0;
|
2020-10-16 10:03:04 +02:00
|
|
|
frame->ClearAll();
|
2016-11-08 23:04:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void __sanitizer_symbolize_global(uptr data_addr, const char *fmt,
|
|
|
|
char *out_buf, uptr out_buf_size) {
|
|
|
|
if (!out_buf_size) return;
|
|
|
|
out_buf[0] = 0;
|
|
|
|
DataInfo DI;
|
|
|
|
if (!Symbolizer::GetOrInit()->SymbolizeData(data_addr, &DI)) return;
|
2021-05-12 14:37:22 +02:00
|
|
|
InternalScopedString data_desc;
|
2016-11-08 23:04:09 +01:00
|
|
|
RenderData(&data_desc, fmt, &DI, common_flags()->strip_path_prefix);
|
|
|
|
internal_strncpy(out_buf, data_desc.data(), out_buf_size);
|
|
|
|
out_buf[out_buf_size - 1] = 0;
|
|
|
|
}
|
ubsan.c (ubsan_expand_null_ifn): Use _v1 suffixed type mismatch builtins...
* ubsan.c (ubsan_expand_null_ifn): Use _v1 suffixed type mismatch
builtins, store max (log2 (align), 0) into uchar field instead of
align into uptr field.
(ubsan_expand_objsize_ifn): Use _v1 suffixed type mismatch builtins,
store uchar 0 field instead of uptr 0 field.
(instrument_nonnull_return): Use _v1 suffixed nonnull return builtin,
instead of passing one address of struct with 2 locations pass
two addresses of structs with 1 location each.
* sanitizer.def (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH,
BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_ABORT,
BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN,
BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_ABORT): Removed.
(BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1,
BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1_ABORT,
BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1,
BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1_ABORT): New builtins.
* c-c++-common/ubsan/float-cast-overflow-1.c: Drop value keyword
from expected output regexps.
* c-c++-common/ubsan/float-cast-overflow-2.c: Likewise.
* c-c++-common/ubsan/float-cast-overflow-3.c: Likewise.
* c-c++-common/ubsan/float-cast-overflow-4.c: Likewise.
* c-c++-common/ubsan/float-cast-overflow-5.c: Likewise.
* c-c++-common/ubsan/float-cast-overflow-6.c: Likewise.
* c-c++-common/ubsan/float-cast-overflow-8.c: Likewise.
* c-c++-common/ubsan/float-cast-overflow-9.c: Likewise.
* c-c++-common/ubsan/float-cast-overflow-10.c: Likewise.
* g++.dg/ubsan/float-cast-overflow-bf.C: Likewise.
* gcc.dg/ubsan/float-cast-overflow-bf.c: Likewise.
* g++.dg/asan/default-options-1.C (__asan_default_options): Add
used attribute.
* g++.dg/asan/asan_test.C: Run with ASAN_OPTIONS=handle_segv=2
in the environment.
* All source files: Merge from upstream 315899.
* asan/Makefile.am (nodist_saninclude_HEADERS): Add
include/sanitizer/tsan_interface.h.
* asan/libtool-version: Bump the libasan SONAME.
* lsan/Makefile.am (sanitizer_lsan_files): Add lsan_common_mac.cc.
(lsan_files): Add lsan_linux.cc, lsan_mac.cc and lsan_malloc_mac.cc.
* sanitizer_common/Makefile.am (sanitizer_common_files): Add
sancov_flags.cc, sanitizer_allocator_checks.cc,
sanitizer_coverage_libcdep_new.cc, sanitizer_errno.cc,
sanitizer_file.cc, sanitizer_mac_libcdep.cc and
sanitizer_stoptheworld_mac.cc. Remove sanitizer_coverage_libcdep.cc
and sanitizer_coverage_mapping_libcdep.cc.
* tsan/Makefile.am (tsan_files): Add tsan_external.cc.
* ubsan/Makefile.am (DEFS): Add -DUBSAN_CAN_USE_CXXABI=1.
(ubsan_files): Add ubsan_init_standalone.cc and
ubsan_signals_standalone.cc.
* ubsan/libtool-version: Bump the libubsan SONAME.
* asan/Makefile.in: Regenerate.
* lsan/Makefile.in: Regenerate.
* sanitizer_common/Makefile.in: Regenerate.
* tsan/Makefile.in: Regenerate.
* ubsan/Makefile.in: Regenerate.
From-SVN: r253887
2017-10-19 13:23:59 +02:00
|
|
|
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
2019-11-05 14:54:57 +01:00
|
|
|
int __sanitizer_get_module_and_offset_for_pc(uptr pc, char *module_name,
|
|
|
|
uptr module_name_len,
|
|
|
|
uptr *pc_offset) {
|
ubsan.c (ubsan_expand_null_ifn): Use _v1 suffixed type mismatch builtins...
* ubsan.c (ubsan_expand_null_ifn): Use _v1 suffixed type mismatch
builtins, store max (log2 (align), 0) into uchar field instead of
align into uptr field.
(ubsan_expand_objsize_ifn): Use _v1 suffixed type mismatch builtins,
store uchar 0 field instead of uptr 0 field.
(instrument_nonnull_return): Use _v1 suffixed nonnull return builtin,
instead of passing one address of struct with 2 locations pass
two addresses of structs with 1 location each.
* sanitizer.def (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH,
BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_ABORT,
BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN,
BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_ABORT): Removed.
(BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1,
BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1_ABORT,
BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1,
BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1_ABORT): New builtins.
* c-c++-common/ubsan/float-cast-overflow-1.c: Drop value keyword
from expected output regexps.
* c-c++-common/ubsan/float-cast-overflow-2.c: Likewise.
* c-c++-common/ubsan/float-cast-overflow-3.c: Likewise.
* c-c++-common/ubsan/float-cast-overflow-4.c: Likewise.
* c-c++-common/ubsan/float-cast-overflow-5.c: Likewise.
* c-c++-common/ubsan/float-cast-overflow-6.c: Likewise.
* c-c++-common/ubsan/float-cast-overflow-8.c: Likewise.
* c-c++-common/ubsan/float-cast-overflow-9.c: Likewise.
* c-c++-common/ubsan/float-cast-overflow-10.c: Likewise.
* g++.dg/ubsan/float-cast-overflow-bf.C: Likewise.
* gcc.dg/ubsan/float-cast-overflow-bf.c: Likewise.
* g++.dg/asan/default-options-1.C (__asan_default_options): Add
used attribute.
* g++.dg/asan/asan_test.C: Run with ASAN_OPTIONS=handle_segv=2
in the environment.
* All source files: Merge from upstream 315899.
* asan/Makefile.am (nodist_saninclude_HEADERS): Add
include/sanitizer/tsan_interface.h.
* asan/libtool-version: Bump the libasan SONAME.
* lsan/Makefile.am (sanitizer_lsan_files): Add lsan_common_mac.cc.
(lsan_files): Add lsan_linux.cc, lsan_mac.cc and lsan_malloc_mac.cc.
* sanitizer_common/Makefile.am (sanitizer_common_files): Add
sancov_flags.cc, sanitizer_allocator_checks.cc,
sanitizer_coverage_libcdep_new.cc, sanitizer_errno.cc,
sanitizer_file.cc, sanitizer_mac_libcdep.cc and
sanitizer_stoptheworld_mac.cc. Remove sanitizer_coverage_libcdep.cc
and sanitizer_coverage_mapping_libcdep.cc.
* tsan/Makefile.am (tsan_files): Add tsan_external.cc.
* ubsan/Makefile.am (DEFS): Add -DUBSAN_CAN_USE_CXXABI=1.
(ubsan_files): Add ubsan_init_standalone.cc and
ubsan_signals_standalone.cc.
* ubsan/libtool-version: Bump the libubsan SONAME.
* asan/Makefile.in: Regenerate.
* lsan/Makefile.in: Regenerate.
* sanitizer_common/Makefile.in: Regenerate.
* tsan/Makefile.in: Regenerate.
* ubsan/Makefile.in: Regenerate.
From-SVN: r253887
2017-10-19 13:23:59 +02:00
|
|
|
return __sanitizer::GetModuleAndOffsetForPc(pc, module_name, module_name_len,
|
|
|
|
pc_offset);
|
|
|
|
}
|
2016-11-08 23:04:09 +01:00
|
|
|
} // extern "C"
|