-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a4093b5
commit 0341a67
Showing
2 changed files
with
14 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,45 +7,21 @@ | |
|
||
#include <stdint.h> | ||
|
||
typedef struct ubsan_type | ||
{ | ||
uint16_t kind; | ||
uint16_t info; | ||
char name[]; | ||
} ubsan_type_t; | ||
|
||
typedef struct ubsan_source_location | ||
{ | ||
const char* file; | ||
uint32_t line; | ||
uint32_t column; | ||
} ubsan_source_location_t; | ||
|
||
typedef struct ubsan_mismatch_data | ||
{ | ||
ubsan_source_location_t location; | ||
ubsan_type_t* type; | ||
uintptr_t alignment; | ||
uint8_t kind; | ||
} ubsan_mismatch_data_t; | ||
|
||
typedef struct ubsan_mismatch_v1_data | ||
{ | ||
ubsan_source_location_t location; | ||
ubsan_type_t* type; | ||
uint8_t log_alignment; | ||
uint8_t kind; | ||
} ubsan_mismatch_v1_data_t; | ||
|
||
void __ubsan_handle_type_mismatch(ubsan_mismatch_data_t* data, uintptr_t ptr); | ||
void __ubsan_handle_type_mismatch(ubsan_source_location_t* location); | ||
|
||
// This function is suffixed with _v1 because Clang and GCC 8 slightly changed | ||
// ABI for 'type mismatch' errors, so compilers now use this function. | ||
// | ||
// See: | ||
// https://patches.linaro.org/project/lkml/patch/[email protected]/ | ||
void __ubsan_handle_type_mismatch_v1(ubsan_mismatch_v1_data_t* data, | ||
uintptr_t ptr); | ||
void __ubsan_handle_type_mismatch_v1(ubsan_source_location_t* location); | ||
|
||
void __ubsan_handle_add_overflow(ubsan_source_location_t* location); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters