[sanitizer] Add list of symbols exported in sanitizers' interface.
Add a new auxiliary file to each sanitizer: sanitizer_interface.inc, listing all
the functions exported, with the macros: INTERFACE_FUNCTION() and
INTERFACE_WEAK_FUNCTION().
So, when we need to define or repeat a procedure for each function in the
sanitizer's interface, we can define the macros and include that header.
In particular, these files are needed for Windows, in the nexts commits.
Also, this files could replace the existing files: weak_symbols.txt for Apple.
Instead of reading weak_symbols.txt to get the list of weak symbols, we could
read the file sanitizer_interface.inc and consider all the symbols included with
the macro INTERFACE_WEAK_FUNCTION(Name).
In this commit, I only include these files to the sanitizers that work on
Windows. We could do the same for the rest of the sanitizers when needed.
I updated tests for: Linux, Darwin and Windows. If a new function is exported
but is not present in the interface list, the tests
"interface_symbols_[darwin|windows|linux].c" fail.
Also, I remove the comments: "/* OPTIONAL */" which are not required any more,
because we use the macro: INTERFACE_WEAK_FUNCTION() for weak functions.
Differential Revision: https://reviews.llvm.org/D29148
llvm-svn: 293682
2017-02-01 04:23:21 +08:00
|
|
|
//===-- ubsan_interface.inc -----------------------------------------------===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Ubsan interface list.
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_add_overflow)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_add_overflow_abort)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_builtin_unreachable)
|
2017-09-16 07:37:22 +08:00
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_cfi_bad_type)
|
[sanitizer] Add list of symbols exported in sanitizers' interface.
Add a new auxiliary file to each sanitizer: sanitizer_interface.inc, listing all
the functions exported, with the macros: INTERFACE_FUNCTION() and
INTERFACE_WEAK_FUNCTION().
So, when we need to define or repeat a procedure for each function in the
sanitizer's interface, we can define the macros and include that header.
In particular, these files are needed for Windows, in the nexts commits.
Also, this files could replace the existing files: weak_symbols.txt for Apple.
Instead of reading weak_symbols.txt to get the list of weak symbols, we could
read the file sanitizer_interface.inc and consider all the symbols included with
the macro INTERFACE_WEAK_FUNCTION(Name).
In this commit, I only include these files to the sanitizers that work on
Windows. We could do the same for the rest of the sanitizers when needed.
I updated tests for: Linux, Darwin and Windows. If a new function is exported
but is not present in the interface list, the tests
"interface_symbols_[darwin|windows|linux].c" fail.
Also, I remove the comments: "/* OPTIONAL */" which are not required any more,
because we use the macro: INTERFACE_WEAK_FUNCTION() for weak functions.
Differential Revision: https://reviews.llvm.org/D29148
llvm-svn: 293682
2017-02-01 04:23:21 +08:00
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_cfi_check_fail)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_cfi_check_fail_abort)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_divrem_overflow)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_divrem_overflow_abort)
|
2017-09-19 02:46:19 +08:00
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_dynamic_type_cache_miss)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_dynamic_type_cache_miss_abort)
|
[sanitizer] Add list of symbols exported in sanitizers' interface.
Add a new auxiliary file to each sanitizer: sanitizer_interface.inc, listing all
the functions exported, with the macros: INTERFACE_FUNCTION() and
INTERFACE_WEAK_FUNCTION().
So, when we need to define or repeat a procedure for each function in the
sanitizer's interface, we can define the macros and include that header.
In particular, these files are needed for Windows, in the nexts commits.
Also, this files could replace the existing files: weak_symbols.txt for Apple.
Instead of reading weak_symbols.txt to get the list of weak symbols, we could
read the file sanitizer_interface.inc and consider all the symbols included with
the macro INTERFACE_WEAK_FUNCTION(Name).
In this commit, I only include these files to the sanitizers that work on
Windows. We could do the same for the rest of the sanitizers when needed.
I updated tests for: Linux, Darwin and Windows. If a new function is exported
but is not present in the interface list, the tests
"interface_symbols_[darwin|windows|linux].c" fail.
Also, I remove the comments: "/* OPTIONAL */" which are not required any more,
because we use the macro: INTERFACE_WEAK_FUNCTION() for weak functions.
Differential Revision: https://reviews.llvm.org/D29148
llvm-svn: 293682
2017-02-01 04:23:21 +08:00
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_float_cast_overflow)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_float_cast_overflow_abort)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_function_type_mismatch)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_function_type_mismatch_abort)
|
2017-07-29 08:20:02 +08:00
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_invalid_builtin)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_invalid_builtin_abort)
|
[sanitizer] Add list of symbols exported in sanitizers' interface.
Add a new auxiliary file to each sanitizer: sanitizer_interface.inc, listing all
the functions exported, with the macros: INTERFACE_FUNCTION() and
INTERFACE_WEAK_FUNCTION().
So, when we need to define or repeat a procedure for each function in the
sanitizer's interface, we can define the macros and include that header.
In particular, these files are needed for Windows, in the nexts commits.
Also, this files could replace the existing files: weak_symbols.txt for Apple.
Instead of reading weak_symbols.txt to get the list of weak symbols, we could
read the file sanitizer_interface.inc and consider all the symbols included with
the macro INTERFACE_WEAK_FUNCTION(Name).
In this commit, I only include these files to the sanitizers that work on
Windows. We could do the same for the rest of the sanitizers when needed.
I updated tests for: Linux, Darwin and Windows. If a new function is exported
but is not present in the interface list, the tests
"interface_symbols_[darwin|windows|linux].c" fail.
Also, I remove the comments: "/* OPTIONAL */" which are not required any more,
because we use the macro: INTERFACE_WEAK_FUNCTION() for weak functions.
Differential Revision: https://reviews.llvm.org/D29148
llvm-svn: 293682
2017-02-01 04:23:21 +08:00
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_load_invalid_value)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_load_invalid_value_abort)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_missing_return)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_mul_overflow)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_mul_overflow_abort)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_negate_overflow)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_negate_overflow_abort)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_nonnull_arg)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_nonnull_arg_abort)
|
2017-06-24 05:32:48 +08:00
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_nonnull_return_v1)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_nonnull_return_v1_abort)
|
2017-03-15 00:36:03 +08:00
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_nullability_arg)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_nullability_arg_abort)
|
2017-06-24 05:32:48 +08:00
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_nullability_return_v1)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_nullability_return_v1_abort)
|
[sanitizer] Add list of symbols exported in sanitizers' interface.
Add a new auxiliary file to each sanitizer: sanitizer_interface.inc, listing all
the functions exported, with the macros: INTERFACE_FUNCTION() and
INTERFACE_WEAK_FUNCTION().
So, when we need to define or repeat a procedure for each function in the
sanitizer's interface, we can define the macros and include that header.
In particular, these files are needed for Windows, in the nexts commits.
Also, this files could replace the existing files: weak_symbols.txt for Apple.
Instead of reading weak_symbols.txt to get the list of weak symbols, we could
read the file sanitizer_interface.inc and consider all the symbols included with
the macro INTERFACE_WEAK_FUNCTION(Name).
In this commit, I only include these files to the sanitizers that work on
Windows. We could do the same for the rest of the sanitizers when needed.
I updated tests for: Linux, Darwin and Windows. If a new function is exported
but is not present in the interface list, the tests
"interface_symbols_[darwin|windows|linux].c" fail.
Also, I remove the comments: "/* OPTIONAL */" which are not required any more,
because we use the macro: INTERFACE_WEAK_FUNCTION() for weak functions.
Differential Revision: https://reviews.llvm.org/D29148
llvm-svn: 293682
2017-02-01 04:23:21 +08:00
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_out_of_bounds)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_out_of_bounds_abort)
|
2017-06-02 03:40:59 +08:00
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_pointer_overflow)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_pointer_overflow_abort)
|
[sanitizer] Add list of symbols exported in sanitizers' interface.
Add a new auxiliary file to each sanitizer: sanitizer_interface.inc, listing all
the functions exported, with the macros: INTERFACE_FUNCTION() and
INTERFACE_WEAK_FUNCTION().
So, when we need to define or repeat a procedure for each function in the
sanitizer's interface, we can define the macros and include that header.
In particular, these files are needed for Windows, in the nexts commits.
Also, this files could replace the existing files: weak_symbols.txt for Apple.
Instead of reading weak_symbols.txt to get the list of weak symbols, we could
read the file sanitizer_interface.inc and consider all the symbols included with
the macro INTERFACE_WEAK_FUNCTION(Name).
In this commit, I only include these files to the sanitizers that work on
Windows. We could do the same for the rest of the sanitizers when needed.
I updated tests for: Linux, Darwin and Windows. If a new function is exported
but is not present in the interface list, the tests
"interface_symbols_[darwin|windows|linux].c" fail.
Also, I remove the comments: "/* OPTIONAL */" which are not required any more,
because we use the macro: INTERFACE_WEAK_FUNCTION() for weak functions.
Differential Revision: https://reviews.llvm.org/D29148
llvm-svn: 293682
2017-02-01 04:23:21 +08:00
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_shift_out_of_bounds)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_shift_out_of_bounds_abort)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_sub_overflow)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_sub_overflow_abort)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_type_mismatch_v1)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_type_mismatch_v1_abort)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_vla_bound_not_positive)
|
|
|
|
INTERFACE_FUNCTION(__ubsan_handle_vla_bound_not_positive_abort)
|
|
|
|
INTERFACE_WEAK_FUNCTION(__ubsan_default_options)
|