|
39 | 39 | #include "config.h"
|
40 | 40 | #include "pub_core_basics.h"
|
41 | 41 | #include "pub_core_libcbase.h"
|
| 42 | +#include "pub_core_libcassert.h" |
| 43 | +#include "pub_core_debuglog.h" |
42 | 44 |
|
43 | 45 | #ifndef HAVE_BUILTIN_POPCOUT
|
44 | 46 |
|
@@ -218,6 +220,81 @@ _intel_fast_memset(void *dest, int value, SizeT num)
|
218 | 220 |
|
219 | 221 | #endif
|
220 | 222 |
|
| 223 | + |
| 224 | +/*====================================================================*/ |
| 225 | +/*=== gcc -fsanitize=undefined helper function support ===*/ |
| 226 | +/*====================================================================*/ |
| 227 | + |
| 228 | +void __ubsan_handle_type_mismatch ( void ); |
| 229 | +void __ubsan_handle_type_mismatch ( void ) |
| 230 | +{ |
| 231 | + VG_(debugLog)(0, "main:ubsan", "In %s", __func__); |
| 232 | + vg_assert(0); |
| 233 | +} |
| 234 | + |
| 235 | +void __ubsan_handle_mul_overflow ( void ); |
| 236 | +void __ubsan_handle_mul_overflow ( void ) |
| 237 | +{ |
| 238 | + VG_(debugLog)(0, "main:ubsan", "In %s", __func__); |
| 239 | + vg_assert(0); |
| 240 | +} |
| 241 | + |
| 242 | +void __ubsan_handle_add_overflow ( void ); |
| 243 | +void __ubsan_handle_add_overflow ( void ) |
| 244 | +{ |
| 245 | + VG_(debugLog)(0, "main:ubsan", "In %s", __func__); |
| 246 | + vg_assert(0); |
| 247 | +} |
| 248 | + |
| 249 | +void __ubsan_handle_sub_overflow ( void ); |
| 250 | +void __ubsan_handle_sub_overflow ( void ) |
| 251 | +{ |
| 252 | + VG_(debugLog)(0, "main:ubsan", "In %s", __func__); |
| 253 | + vg_assert(0); |
| 254 | +} |
| 255 | + |
| 256 | +void __ubsan_handle_divrem_overflow ( void ); |
| 257 | +void __ubsan_handle_divrem_overflow ( void ) |
| 258 | +{ |
| 259 | + VG_(debugLog)(0, "main:ubsan", "In %s", __func__); |
| 260 | + vg_assert(0); |
| 261 | +} |
| 262 | + |
| 263 | +void __ubsan_handle_negate_overflow ( void ); |
| 264 | +void __ubsan_handle_negate_overflow ( void ) |
| 265 | +{ |
| 266 | + VG_(debugLog)(0, "main:ubsan", "In %s", __func__); |
| 267 | + vg_assert(0); |
| 268 | +} |
| 269 | + |
| 270 | +void __ubsan_handle_out_of_bounds ( void ); |
| 271 | +void __ubsan_handle_out_of_bounds ( void ) |
| 272 | +{ |
| 273 | + VG_(debugLog)(0, "main:ubsan", "In %s", __func__); |
| 274 | + vg_assert(0); |
| 275 | +} |
| 276 | + |
| 277 | +void __ubsan_handle_shift_out_of_bounds ( void ); |
| 278 | +void __ubsan_handle_shift_out_of_bounds ( void ) |
| 279 | +{ |
| 280 | + VG_(debugLog)(0, "main:ubsan", "In %s", __func__); |
| 281 | + vg_assert(0); |
| 282 | +} |
| 283 | + |
| 284 | +void __ubsan_handle_vla_bound_not_positive ( void ); |
| 285 | +void __ubsan_handle_vla_bound_not_positive ( void ) |
| 286 | +{ |
| 287 | + VG_(debugLog)(0, "main:ubsan", "In %s", __func__); |
| 288 | + vg_assert(0); |
| 289 | +} |
| 290 | + |
| 291 | +void __ubsan_handle_nonnull_arg ( void ); |
| 292 | +void __ubsan_handle_nonnull_arg ( void ) |
| 293 | +{ |
| 294 | + VG_(debugLog)(0, "main:ubsan", "In %s", __func__); |
| 295 | + vg_assert(0); |
| 296 | +} |
| 297 | + |
221 | 298 | /*--------------------------------------------------------------------*/
|
222 | 299 | /*--- end ---*/
|
223 | 300 | /*--------------------------------------------------------------------*/
|
0 commit comments