rust/tests/compile-fail
bors 57786678d4 Auto merge of #1975 - DrMeepster:backtrace_fix, r=RalfJung
Make backtraces work with #[global_allocator]

Currently, backtraces break when the global allocator is overridden because the allocator will attempt to deallocate memory allocated directly by Miri.

~~This PR fixes that by using a new memory kind and providing a function to deallocate it. We can't call the custom allocator to allocate because it's not possible to call a function in the middle of a shim.~~

This PR fixes that by adding a new version of the backtrace API accessible by setting `flags` to 1. Existing code still functions.

backtrace-rs PR: rust-lang/backtrace-rs#462

Fixes https://github.com/rust-lang/miri/issues/1996
2022-03-20 02:37:09 +00:00
..
alloc rustup 2021-11-01 16:12:38 -07:00
backtrace add new version of backtrace api using flags=1 2022-03-19 18:14:11 -07:00
concurrency also ignore 'thread leaks' with -Zmiri-ignore-leaks 2021-07-25 14:21:06 +02:00
dangling_pointers adjust Miri to Pointer type overhaul 2021-07-16 10:10:12 +02:00
data_race avoid importing C functions in alloc_write_race test 2021-05-19 15:27:58 +02:00
fs allow varargs for libc::open when it is allowed by the second argument 2022-03-05 17:29:48 -05:00
function_calls adjust output for calling convention check 2021-12-24 12:02:23 +01:00
function_pointers Update pointer error messages 2021-05-08 15:33:27 +08:00
intrinsics detect when unused bits of a SIMD bitmask are non-0 2022-03-17 13:08:01 -04:00
panic adjust output for calling convention check 2021-12-24 12:02:23 +01:00
stacked_borrows Print more in SB error diagnostics 2022-03-16 20:12:04 -04:00
sync Add tests for double destroying various pthread items 2021-12-06 21:15:02 +00:00
unaligned_pointers Make sure we notice when a u16 is loaded at offset 1 into a u8 allocation 2022-03-02 13:06:28 -05:00
validity update fn ptr tests 2022-02-25 12:06:10 -05:00
abort-terminator.rs Fix tests for C-unwind ABI changes 2021-08-07 15:57:54 +08:00
box-cell-alias.rs Print more in SB error diagnostics 2022-03-16 20:12:04 -04:00
branchless-select-i128-pointer.rs add test by @eddyb 2021-02-16 10:18:31 +01:00
breakpoint.rs Support breakpoint intrinsic 2021-03-04 07:48:28 -05:00
environ-gets-deallocated.rs fix some ignore-windows comments 2020-06-28 20:40:20 +02:00
erroneous_const.rs rustup 2021-10-05 13:13:06 -07:00
extern_static.rs rustup 2021-01-31 13:12:25 +01:00
fast_math_both.rs Simplify finiteness checking 2021-05-03 10:08:42 -04:00
fast_math_first.rs Simplify finiteness checking 2021-05-03 10:08:42 -04:00
fast_math_second.rs test for infinite value in f*_fast 2021-05-03 09:56:51 -04:00
generator-pinned-moved.rs rustup; make sure the iterator moves even with smarter optimizations 2020-09-20 10:26:22 +02:00
invalid_bool.rs rustup 2021-04-25 16:57:48 +02:00
invalid_char.rs rustup for fixed error messages 2020-05-02 02:13:48 +02:00
invalid_enum_tag.rs bump Rust 2020-06-20 11:48:42 +02:00
invalid_int.rs make sure our disable flags do not miss all bugs; move type-assert intrinsic tests to their folder 2020-04-14 10:23:47 +02:00
issue-miri-1112.rs rustup; fix error messages 2020-05-07 08:38:59 +02:00
memleak_rc.rs enable leak check tests on Windows 2020-07-23 15:56:38 +02:00
memleak.rs enable leak check tests on Windows 2020-07-23 15:56:38 +02:00
modifying_constants.rs adjust for error reform 2020-03-19 08:25:08 +01:00
never_say_never.rs the never type got de-stabilized again; adjust tests 2019-12-15 12:23:43 +01:00
never_transmute_humans.rs rustup, fix for intrinsic rename and transmute error change 2020-03-14 09:27:35 +01:00
never_transmute_void.rs adjust stacktrace printing to rustc changes 2020-04-02 09:14:17 +02:00
no_main.rs Move no_main test to compile-fail 2020-07-09 17:21:09 +02:00
null_pointer_deref_zst.rs add ptr_offset_from OOB test, and update test errors 2022-03-10 18:56:19 -05:00
null_pointer_deref.rs Update pointer error messages 2021-05-08 15:33:27 +08:00
null_pointer_write_zst.rs add ptr_offset_from OOB test, and update test errors 2022-03-10 18:56:19 -05:00
null_pointer_write.rs Update pointer error messages 2021-05-08 15:33:27 +08:00
pointer_partial_overwrite.rs adjust for ERR_ON_PARTIAL_PTR_OVERWRITE 2021-08-02 17:58:55 +02:00
pointer_partial_read.rs adjust for ERR_ON_PARTIAL_PTR_OVERWRITE 2021-08-02 17:58:55 +02:00
rc_as_ptr.rs rustup (and account for stabilization) 2020-05-30 09:23:25 +02:00
reading_half_a_pointer.rs rustup, and some final message adjustments 2020-03-19 08:41:01 +01:00
rustc-error.rs fix exit code on rustc errors 2020-04-25 11:12:50 +02:00
shim_arg_size.rs remove some unnecessary feature flags 2020-11-10 16:51:07 +01:00
slice-too-big.rs adjust error 2020-03-09 17:03:39 +01:00
static_memory_modification1.rs adjust for error reform 2020-03-19 08:25:08 +01:00
static_memory_modification2.rs adjust for error reform 2020-03-19 08:25:08 +01:00
static_memory_modification3.rs adjust for error reform 2020-03-19 08:25:08 +01:00
transmute_fat1.rs rustup, and some final message adjustments 2020-03-19 08:41:01 +01:00
transmute-pair-uninit.rs rustup 2021-02-23 09:23:49 +01:00
uninit_buffer.rs Update to match rustc changes 2020-05-22 17:03:25 +02:00
uninit_byte_read.rs rename tests: undefined -> uninit 2020-04-27 12:32:03 +02:00
uninit_float.rs Add tests for -Zmiri-check-number-validity 2021-11-10 11:36:42 -08:00
uninit_integer_signed.rs Add tests for -Zmiri-check-number-validity 2021-11-10 11:36:42 -08:00
uninit_integer.rs Add tests for -Zmiri-check-number-validity 2021-11-10 11:36:42 -08:00
uninit_raw_ptr.rs Add test for uninit raw ptrs 2021-11-10 11:36:42 -08:00
unreachable.rs test unreachable intrinsic 2020-03-25 09:32:15 +01:00
unsupported_foreign_function.rs Unsupported foreign non-"C"/"system"-ABI function calls are not UB 2021-03-17 21:20:04 +08:00
unsupported_signal.rs expand comment 2021-06-06 10:33:46 +02:00
zst1.rs adjust Miri to Pointer type overhaul 2021-07-16 10:10:12 +02:00
zst2.rs disable MIR opts for ZST-related tests 2021-03-25 12:44:30 +01:00
zst3.rs adjust Miri to Pointer type overhaul 2021-07-16 10:10:12 +02:00