2013-02-13 11:46:01 +01:00
|
|
|
//===-- asan_interface_internal.h -------------------------------*- C++ -*-===//
|
|
|
|
//
|
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-02-13 11:46:01 +01:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file is a part of AddressSanitizer, an address sanity checker.
|
|
|
|
//
|
2015-10-21 09:32:45 +02:00
|
|
|
// This header declares the AddressSanitizer runtime interface functions.
|
|
|
|
// The runtime library has to define these functions so the instrumented program
|
|
|
|
// could call them.
|
|
|
|
//
|
|
|
|
// See also include/sanitizer/asan_interface.h
|
2013-02-13 11:46:01 +01:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef ASAN_INTERFACE_INTERNAL_H
|
|
|
|
#define ASAN_INTERFACE_INTERNAL_H
|
|
|
|
|
|
|
|
#include "sanitizer_common/sanitizer_internal_defs.h"
|
|
|
|
|
2014-09-23 19:59:53 +02:00
|
|
|
#include "asan_init_version.h"
|
|
|
|
|
2013-02-13 11:46:01 +01:00
|
|
|
using __sanitizer::uptr;
|
2016-11-08 23:04:09 +01:00
|
|
|
using __sanitizer::u64;
|
|
|
|
using __sanitizer::u32;
|
2013-02-13 11:46:01 +01:00
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
// This function should be called at the very beginning of the process,
|
|
|
|
// before any instrumented code is executed and before any call to malloc.
|
2014-09-23 19:59:53 +02:00
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_init();
|
|
|
|
|
2015-10-21 09:32:45 +02:00
|
|
|
// This function exists purely to get a linker/loader error when using
|
|
|
|
// incompatible versions of instrumentation and runtime library. Please note
|
|
|
|
// that __asan_version_mismatch_check is a macro that is replaced with
|
|
|
|
// __asan_version_mismatch_check_vXXX at compile-time.
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_version_mismatch_check();
|
|
|
|
|
2014-09-23 19:59:53 +02:00
|
|
|
// This structure is used to describe the source location of a place where
|
|
|
|
// global was defined.
|
|
|
|
struct __asan_global_source_location {
|
|
|
|
const char *filename;
|
|
|
|
int line_no;
|
|
|
|
int column_no;
|
|
|
|
};
|
2013-02-13 11:46:01 +01:00
|
|
|
|
|
|
|
// This structure describes an instrumented global variable.
|
|
|
|
struct __asan_global {
|
|
|
|
uptr beg; // The address of the global.
|
|
|
|
uptr size; // The original size of the global.
|
|
|
|
uptr size_with_redzone; // The size with the redzone.
|
|
|
|
const char *name; // Name as a C string.
|
2013-11-04 22:33:31 +01:00
|
|
|
const char *module_name; // Module name as a C string. This pointer is a
|
|
|
|
// unique identifier of a module.
|
2013-02-13 11:46:01 +01:00
|
|
|
uptr has_dynamic_init; // Non-zero if the global has dynamic initializer.
|
2014-09-23 19:59:53 +02:00
|
|
|
__asan_global_source_location *location; // Source location of a global,
|
|
|
|
// or NULL if it is unknown.
|
2016-11-08 23:04:09 +01:00
|
|
|
uptr odr_indicator; // The address of the ODR indicator symbol.
|
2013-02-13 11:46:01 +01:00
|
|
|
};
|
|
|
|
|
2016-11-08 23:04:09 +01:00
|
|
|
// These functions can be called on some platforms to find globals in the same
|
|
|
|
// loaded image as `flag' and apply __asan_(un)register_globals to them,
|
|
|
|
// filtering out redundant calls.
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void __asan_register_image_globals(uptr *flag);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void __asan_unregister_image_globals(uptr *flag);
|
|
|
|
|
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
|
|
|
|
void __asan_register_elf_globals(uptr *flag, void *start, void *stop);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void __asan_unregister_elf_globals(uptr *flag, void *start, void *stop);
|
|
|
|
|
2013-02-13 11:46:01 +01:00
|
|
|
// These two functions should be called by the instrumented code.
|
|
|
|
// 'globals' is an array of structures describing 'n' globals.
|
2013-11-04 22:33:31 +01:00
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void __asan_register_globals(__asan_global *globals, uptr n);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void __asan_unregister_globals(__asan_global *globals, uptr n);
|
2013-02-13 11:46:01 +01:00
|
|
|
|
|
|
|
// These two functions should be called before and after dynamic initializers
|
2013-11-04 22:33:31 +01:00
|
|
|
// of a single module run, respectively.
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void __asan_before_dynamic_init(const char *module_name);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void __asan_after_dynamic_init();
|
2013-02-13 11:46:01 +01:00
|
|
|
|
2016-11-08 23:04:09 +01:00
|
|
|
// Sets bytes of the given range of the shadow memory into specific value.
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void __asan_set_shadow_00(uptr addr, uptr size);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void __asan_set_shadow_f1(uptr addr, uptr size);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void __asan_set_shadow_f2(uptr addr, uptr size);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void __asan_set_shadow_f3(uptr addr, uptr size);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void __asan_set_shadow_f5(uptr addr, uptr size);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void __asan_set_shadow_f8(uptr addr, uptr size);
|
|
|
|
|
2013-02-13 11:46:01 +01:00
|
|
|
// These two functions are used by instrumented code in the
|
|
|
|
// use-after-scope mode. They mark memory for local variables as
|
|
|
|
// unaddressable when they leave scope and addressable before the
|
|
|
|
// function exits.
|
2013-11-04 22:33:31 +01:00
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void __asan_poison_stack_memory(uptr addr, uptr size);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void __asan_unpoison_stack_memory(uptr addr, uptr size);
|
2013-02-13 11:46:01 +01:00
|
|
|
|
|
|
|
// Performs cleanup before a NoReturn function. Must be called before things
|
|
|
|
// like _exit and execl to avoid false positives on stack.
|
2013-11-04 22:33:31 +01:00
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_handle_no_return();
|
2013-02-13 11:46:01 +01:00
|
|
|
|
2013-11-04 22:33:31 +01:00
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void __asan_poison_memory_region(void const volatile *addr, uptr size);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void __asan_unpoison_memory_region(void const volatile *addr, uptr size);
|
2013-02-13 11:46:01 +01:00
|
|
|
|
2013-11-04 22:33:31 +01:00
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
2014-05-22 09:09:21 +02:00
|
|
|
int __asan_address_is_poisoned(void const volatile *addr);
|
2013-02-13 11:46:01 +01:00
|
|
|
|
2013-11-04 22:33:31 +01:00
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
uptr __asan_region_is_poisoned(uptr beg, uptr size);
|
2013-02-13 11:46:01 +01:00
|
|
|
|
2013-11-04 22:33:31 +01:00
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void __asan_describe_address(uptr addr);
|
2013-02-13 11:46:01 +01:00
|
|
|
|
2014-11-13 21:41:38 +01:00
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
int __asan_report_present();
|
|
|
|
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
uptr __asan_get_report_pc();
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
uptr __asan_get_report_bp();
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
uptr __asan_get_report_sp();
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
uptr __asan_get_report_address();
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
int __asan_get_report_access_type();
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
uptr __asan_get_report_access_size();
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
const char * __asan_get_report_description();
|
|
|
|
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
const char * __asan_locate_address(uptr addr, char *name, uptr name_size,
|
|
|
|
uptr *region_address, uptr *region_size);
|
|
|
|
|
2014-09-23 19:59:53 +02:00
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
uptr __asan_get_alloc_stack(uptr addr, uptr *trace, uptr size,
|
|
|
|
u32 *thread_id);
|
|
|
|
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
uptr __asan_get_free_stack(uptr addr, uptr *trace, uptr size,
|
|
|
|
u32 *thread_id);
|
|
|
|
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void __asan_get_shadow_mapping(uptr *shadow_scale, uptr *shadow_offset);
|
|
|
|
|
2013-11-04 22:33:31 +01:00
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
2013-02-13 11:46:01 +01:00
|
|
|
void __asan_report_error(uptr pc, uptr bp, uptr sp,
|
2015-10-21 09:32:45 +02:00
|
|
|
uptr addr, int is_write, uptr access_size, u32 exp);
|
2013-02-13 11:46:01 +01:00
|
|
|
|
2013-11-04 22:33:31 +01:00
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void __asan_set_death_callback(void (*callback)(void));
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void __asan_set_error_report_callback(void (*callback)(const char*));
|
2013-02-13 11:46:01 +01:00
|
|
|
|
2013-11-04 22:33:31 +01:00
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE
|
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
|
|
|
void __asan_on_error();
|
2013-02-13 11:46:01 +01:00
|
|
|
|
2013-11-04 22:33:31 +01:00
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_print_accumulated_stats();
|
|
|
|
|
2020-10-16 10:03:04 +02:00
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
const char *__asan_default_options();
|
2013-11-04 22:33:31 +01:00
|
|
|
|
2016-11-08 23:04:09 +01:00
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
extern uptr __asan_shadow_memory_dynamic_address;
|
|
|
|
|
2013-11-04 22:33:31 +01:00
|
|
|
// Global flag, copy of ASAN_OPTIONS=detect_stack_use_after_return
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
extern int __asan_option_detect_stack_use_after_return;
|
2014-05-22 09:09:21 +02:00
|
|
|
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
extern uptr *__asan_test_only_reported_buggy_pointer;
|
|
|
|
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_load1(uptr p);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_load2(uptr p);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_load4(uptr p);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_load8(uptr p);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_load16(uptr p);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_store1(uptr p);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_store2(uptr p);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_store4(uptr p);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_store8(uptr p);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_store16(uptr p);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_loadN(uptr p, uptr size);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_storeN(uptr p, uptr size);
|
|
|
|
|
2015-11-23 10:07:18 +01:00
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_load1_noabort(uptr p);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_load2_noabort(uptr p);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_load4_noabort(uptr p);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_load8_noabort(uptr p);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_load16_noabort(uptr p);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_store1_noabort(uptr p);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_store2_noabort(uptr p);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_store4_noabort(uptr p);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_store8_noabort(uptr p);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_store16_noabort(uptr p);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_loadN_noabort(uptr p, uptr size);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_storeN_noabort(uptr p, uptr size);
|
|
|
|
|
2015-10-21 09:32:45 +02:00
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_exp_load1(uptr p, u32 exp);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_exp_load2(uptr p, u32 exp);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_exp_load4(uptr p, u32 exp);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_exp_load8(uptr p, u32 exp);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_exp_load16(uptr p, u32 exp);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_exp_store1(uptr p, u32 exp);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_exp_store2(uptr p, u32 exp);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_exp_store4(uptr p, u32 exp);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_exp_store8(uptr p, u32 exp);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_exp_store16(uptr p, u32 exp);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_exp_loadN(uptr p, uptr size,
|
|
|
|
u32 exp);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_exp_storeN(uptr p, uptr size,
|
|
|
|
u32 exp);
|
|
|
|
|
2014-05-22 09:09:21 +02:00
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void* __asan_memcpy(void *dst, const void *src, uptr size);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void* __asan_memset(void *s, int c, uptr n);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void* __asan_memmove(void* dest, const void* src, uptr n);
|
2014-09-23 19:59:53 +02:00
|
|
|
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void __asan_poison_cxx_array_cookie(uptr p);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
uptr __asan_load_cxx_array_cookie(uptr *p);
|
2014-11-13 21:41:38 +01:00
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void __asan_poison_intra_object_redzone(uptr p, uptr size);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void __asan_unpoison_intra_object_redzone(uptr p, uptr size);
|
2015-10-21 09:32:45 +02:00
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void __asan_alloca_poison(uptr addr, uptr size);
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE
|
|
|
|
void __asan_allocas_unpoison(uptr top, uptr bottom);
|
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 SANITIZER_WEAK_ATTRIBUTE
|
|
|
|
const char* __asan_default_suppressions();
|
2019-08-14 10:47:11 +02:00
|
|
|
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE void __asan_handle_vfork(void *sp);
|
2019-11-07 10:33:54 +01:00
|
|
|
|
|
|
|
SANITIZER_INTERFACE_ATTRIBUTE int __asan_update_allocation_context(
|
|
|
|
void *addr);
|
2013-02-13 11:46:01 +01:00
|
|
|
} // extern "C"
|
|
|
|
|
|
|
|
#endif // ASAN_INTERFACE_INTERNAL_H
|