Eric Huss
0eb293ddb7
Use an allow-list of platforms that support std.
...
Use a fall-through for no_std targets.
2020-07-15 09:57:10 -07:00
Eric Huss
6e9a1de0d1
Introduce restricted-std feature.
2020-07-15 09:57:05 -07:00
David Wood
14ea7a777f
lints: add improper_ctypes_definitions
...
This commit adds a new lint - `improper_ctypes_definitions` - which
functions identically to `improper_ctypes`, but on `extern "C" fn`
definitions (as opposed to `improper_ctypes`'s `extern "C" {}`
declarations).
Signed-off-by: David Wood <david@davidtw.co>
2020-06-24 12:09:35 +01:00
Mark Rousskov
7139342249
Bump to 1.46
2020-06-03 15:27:51 -04:00
Ralf Jung
5980d972d1
make abort intrinsic safe, and correct its documentation
2020-05-17 11:23:42 +02:00
Mark Rousskov
93eed402ad
Bump bootstrap compiler
2020-04-25 09:25:33 -04:00
Daniel Frampton
794181788d
Make panic unwind the default for aarch64-*-windows-msvc targets
2020-04-03 09:41:58 -07:00
Stefan Lankes
410cd7a3e0
remove unused imports
...
patch is required to avoid compiler errors by building src/libpanic_unwind/hermit.rs
2020-03-19 07:53:32 +01:00
Mazdak Farrokhzad
5ee4f6f660
fix pre-expansion linting infra
2020-03-18 15:08:25 +01:00
Ralf Jung
b450e1baf4
fix comment, rustfmt
2020-03-14 13:09:02 +01:00
Ralf Jung
9c5d8e9b52
adjust Miri interaction with panic runtime
2020-03-14 11:24:11 +01:00
Amanieu d'Antras
9f3679fe44
Apply review feedback
2020-03-07 16:31:30 +00:00
Amanieu d'Antras
1c950e5c6f
Simplify the try intrinsic by using a callback in the catch block
2020-03-05 17:36:50 +00:00
Amanieu d'Antras
5953c100d1
Use #[rustc_std_internal_symbol] instead of #[no_mangle]
2020-03-05 17:36:50 +00:00
Amanieu d'Antras
f4f91f0b2f
Remove eh_unwind_resume lang item
2020-03-05 17:36:50 +00:00
Amanieu d'Antras
61b67d0c19
Fix cross-DLL panics under MSVC
2020-03-02 11:43:07 +00:00
Amanieu d'Antras
01d04944ce
Apply review feedback
2020-03-02 11:43:07 +00:00
Amanieu d'Antras
5b682354f2
Fix some minor issues
2020-03-02 11:43:07 +00:00
Mark Rousskov
d45ce5aed6
Inline catching panics into std::catch_unwind
...
This allows LLVM to inline the happy path, such that catching unwinding is
zero-cost when no panic occurs. This also allows us to match the code generated
by C++ try/catch.
2020-03-02 11:43:06 +00:00
Mark Rousskov
31dcdc9e13
Drop cfg(bootstrap) code
2020-01-31 12:31:09 -05:00
Tianjiao Huang
d336e593cc
Fix invalid link to C++ Exception Handling ABI documentation
2020-01-19 12:16:29 -08:00
Amanieu d'Antras
25519e5290
Fix destructor in emcc.rs
2020-01-13 12:54:16 +00:00
Amanieu d'Antras
4f163afed6
Fix destructor return value in emcc.rs
2020-01-13 00:39:41 +00:00
Amanieu d'Antras
3a025760be
Abort if C++ tries to swallow a Rust panic
2020-01-11 10:18:44 +00:00
Amanieu d'Antras
757ed07f37
Apply review feedback
2020-01-11 10:18:44 +00:00
Amanieu d'Antras
838e3874fc
Explain the panic! in exception_copy
2020-01-11 10:18:44 +00:00
Amanieu d'Antras
c15ad84519
Fix a memory leak in SEH unwinding if a Rust panic is caught by C++ and discarded
2020-01-11 10:18:44 +00:00
Amanieu d'Antras
46f52260d8
Simplify exception cleanup for libunwind-style unwinding
2020-01-11 10:18:44 +00:00
Amanieu d'Antras
10720b418e
Fix a memory leak in emcc if a Rust panic is caught by C++ and discarded
2020-01-11 10:18:44 +00:00
Lzu Tao
cd9a73d2ea
make use of pointer::is_null
2020-01-10 12:52:00 +00:00
bors
ef92009c1d
Auto merge of #66899 - msizanoen1:riscv-std, r=alexcrichton
...
Standard library support for riscv64gc-unknown-linux-gnu
Add std support for RISC-V 64-bit GNU/Linux and update libc for RISC-V support.
r? @alexcrichton
2020-01-06 19:07:42 +00:00
bors
766fba3fdc
Auto merge of #67779 - Amanieu:ehabi_fix, r=Mark-Simulacrum
...
Update the barrier cache during ARM EHABI unwinding
Fixes #67242
r? @alexcrichton
2020-01-02 07:04:20 +00:00
Amanieu d'Antras
057ad39ea8
Update the barrier cache during ARM EHABI unwinding
2020-01-01 17:20:16 +01:00
msizanoen1
b830b673e7
Add support for RISC-V 64-bit GNU/Linux
2020-01-01 09:52:18 +07:00
Lzu Tao
3a2ef17194
tidy: change msdn links to newer locations
...
see accouncement at https://docs.microsoft.com/welcome-to-docs
2019-12-25 15:35:54 +00:00
Mark Rousskov
a06baa56b9
Format the world
2019-12-22 17:42:47 -05:00
Ralf Jung
02b66a1901
libunwind_panic: adjust miri panic hack
2019-11-30 10:13:25 +01:00
Ralf Jung
56203be06f
Rollup merge of #66766 - RalfJung:panic-comments, r=SimonSapin
...
Panic machinery comments and tweaks
This is mostly more comments, but I also renamed some things:
* `BoxMeUp::box_me_up` is not terribly descriptive, and since this is a "take"-style method (the argument is `&mut self` but the return type is fully owned, even though you can't tell from the type) I chose a name involving "take".
* `continue_panic_fmt` was very confusing as it was entirely unclear what was being continued -- for some time I thought "continue" might be the same as "resume" for a panic, but that's something entirely different. So I renamed this to `begin_panic_handler`, matching the `begin_panic*` theme of the other entry points.
r? @Dylan-DPC @SimonSapin
2019-11-29 22:57:33 +01:00
Brian Wignall
16fabd8efd
Fix spelling typos
2019-11-26 22:19:54 -05:00
Ralf Jung
08f779cb4b
better comment and rename BoxMeUp::box_me_up to take_box
2019-11-25 12:16:08 +01:00
Ralf Jung
e8ff4656fc
avoid linking errors
2019-11-16 09:37:45 +01:00
Ralf Jung
52d7246a93
miri panic_unwind: fix hack for SEH platforms
2019-11-16 09:29:26 +01:00
Ralf Jung
065e1b8d8a
more comment
2019-11-15 15:57:01 +01:00
Ralf Jung
b6d93d9167
libpanic_unwind for Miri: make sure we have the SEH lang items when needed
2019-11-15 12:54:08 +01:00
Robin Kruppe
a1f67ad949
Revert "Auto merge of #65134 - davidtwco:issue-19834-improper-ctypes-in-extern-C-fn, r=rkruppe"
...
This reverts commit 3f0e16473d , reversing
changes made to 61a551b493 .
2019-11-13 17:00:47 +01:00
bors
0f12bad718
Auto merge of #66156 - Mark-Simulacrum:stage0-step, r=pietroalbini
...
Stage0 step
r? @pietroalbini
2019-11-13 00:42:19 +00:00
Mark Rousskov
994d83666d
Remove no longer needed mutability
2019-11-12 16:37:22 -05:00
Mark Rousskov
997feacddd
Snap cfgs
2019-11-12 16:36:57 -05:00
Aaron Hill
4ecb80d5d8
Remove trampoline, pass ret and unwind when handling intrinsics
2019-11-11 15:14:37 -05:00
Aaron Hill
607339f66a
Fix tidy
2019-11-11 15:14:37 -05:00