Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXPERIMENT: support well-nested unwinds #99260

Closed
wants to merge 1 commit into from

Conversation

CAD97
Copy link
Contributor

@CAD97 CAD97 commented Jul 15, 2022

This is deceptively simple... experiment primarily for a perf run to estimate the cost of providing this behavior.

Currently, any panic during an unwind will immediately abort the process. That means that the otherwise inconspicuous code

catch_unwind(|| panic!());

will run normally in normal code, but if this happens to be called from a drop implementation during unwinding, abort the process.

This behavior is relied upon in the ecosystem for soundness by the way of stack guards which trigger an abort via panic-in-unwind when dropped. This PR does not change the behavior of such drop bombs.

What this PR does is deceptively simple: it makes it so that catch_unwind clears the "is panicking" state when running the provided closure. This means that even if we were unwinding before calling catch_unwind, the code inside sees a normal non-panicking environment and can run normally, including to panic and unwind to the registered catch_unwind handler.

A second panic which is covered by the same catch_unwind continues to immediately abort.

@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jul 15, 2022
@rustbot
Copy link
Collaborator

rustbot commented Jul 15, 2022

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@rust-highfive
Copy link
Collaborator

r? @joshtriplett

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 15, 2022
@CAD97
Copy link
Contributor Author

CAD97 commented Jul 15, 2022

Very much a lang concern as well; tagging so it doesn't get accidentally overlooked.

@rustbot modify labels +T-lang

@rustbot rustbot added the T-lang Relevant to the language team, which will review and decide on the PR/issue. label Jul 15, 2022
@Amanieu
Copy link
Member

Amanieu commented Jul 15, 2022

In #67502 Mark and I worked to make catch_unwind have zero overhead when no panic occurs. This would be a regression, but it's not clear how significant it would be.

Could you show the disassembly of this code with & without your change?

#![feature(c_unwind)]

extern "C-unwind" {
    fn happy();
    fn unfortunate();
}

#[inline(never)]
#[no_mangle]
pub fn notable_function() -> i32 {
    unsafe {
        std::panic::catch_unwind(|| {
            happy(); 42
        }).unwrap_or_else(|e| {
            std::mem::forget(e);
            unfortunate();
            13
        })
    }
}

@Amanieu
Copy link
Member

Amanieu commented Jul 15, 2022

Also this PR doesn't handle interactions with exceptions from other languages. If a C++ exception unwinds through Rust code then the panic count will not have been incremented. Similarly if Rust code is executing within a C++ catch block then panicking will not know that it is "safe" to panic.

@CAD97
Copy link
Contributor Author

CAD97 commented Jul 15, 2022

Assembly generated by the above file with

rustc +stage1 src/lib.rs --crate-type cdylib --target x86_64-pc-windows-msvc -Cpanic=unwind -O --emit asm -o stage1.s:

38b7215 (nightly 2022-07-11)
	.text
	.def	@feat.00;
	.scl	3;
	.type	0;
	.endef
	.globl	@feat.00
.set @feat.00, 0
	.file	"lib.4978488e-cgu.0"
	.def	notable_function;
	.scl	2;
	.type	32;
	.endef
	.section	.text,"xr",one_only,notable_function
	.globl	notable_function
	.p2align	4, 0x90
notable_function:
.Lfunc_begin0:
.seh_proc notable_function
	.seh_handler __CxxFrameHandler3, @unwind, @except
	pushq	%rbp
	.seh_pushreg %rbp
	subq	$48, %rsp
	.seh_stackalloc 48
	leaq	48(%rsp), %rbp
	.seh_setframe %rbp, 48
	.seh_endprologue
	movq	$-2, -16(%rbp)
.Ltmp0:
	callq	happy
.Ltmp1:
	movl	$42, %eax
.LBB0_5:
	addq	$48, %rsp
	popq	%rbp
	retq
.LBB0_4:
$ehgcr_0_4:
	callq	unfortunate
	movl	$13, %eax
	jmp	.LBB0_5
	.seh_handlerdata
	.long	($cppxdata$notable_function)@IMGREL
	.section	.text,"xr",one_only,notable_function
	.seh_endproc
	.def	"?catch$2@?0?notable_function@4HA";
	.scl	3;
	.type	32;
	.endef
	.p2align	4, 0x90
"?catch$2@?0?notable_function@4HA":
.seh_proc "?catch$2@?0?notable_function@4HA"
	.seh_handler __CxxFrameHandler3, @unwind, @except
.LBB0_2:
	movq	%rdx, 16(%rsp)
	pushq	%rbp
	.seh_pushreg %rbp
	subq	$32, %rsp
	.seh_stackalloc 32
	leaq	48(%rdx), %rbp
	.seh_endprologue
	movq	-8(%rbp), %rcx
	callq	_ZN3std9panicking3try7cleanup17h9c87e793fb4cdaabE
	leaq	.LBB0_4(%rip), %rax
	addq	$32, %rsp
	popq	%rbp
	retq
	.seh_handlerdata
	.long	($cppxdata$notable_function)@IMGREL
	.section	.text,"xr",one_only,notable_function
	.seh_endproc
	.def	"?catch$3@?0?notable_function@4HA";
	.scl	3;
	.type	32;
	.endef
	.p2align	4, 0x90
"?catch$3@?0?notable_function@4HA":
.seh_proc "?catch$3@?0?notable_function@4HA"
	.seh_handler __CxxFrameHandler3, @unwind, @except
.LBB0_3:
	movq	%rdx, 16(%rsp)
	pushq	%rbp
	.seh_pushreg %rbp
	subq	$32, %rsp
	.seh_stackalloc 32
	leaq	48(%rdx), %rbp
	.seh_endprologue
	xorl	%ecx, %ecx
	callq	_ZN3std9panicking3try7cleanup17h9c87e793fb4cdaabE
	leaq	.LBB0_4(%rip), %rax
	addq	$32, %rsp
	popq	%rbp
	retq
.Lfunc_end0:
	.seh_handlerdata
	.long	($cppxdata$notable_function)@IMGREL
	.section	.text,"xr",one_only,notable_function
	.seh_endproc
	.section	.xdata,"dr",associative,notable_function
	.p2align	2
$cppxdata$notable_function:
	.long	429065506
	.long	2
	.long	($stateUnwindMap$notable_function)@IMGREL
	.long	1
	.long	($tryMap$notable_function)@IMGREL
	.long	5
	.long	($ip2state$notable_function)@IMGREL
	.long	32
	.long	0
	.long	1
$stateUnwindMap$notable_function:
	.long	-1
	.long	0
	.long	-1
	.long	0
$tryMap$notable_function:
	.long	0
	.long	0
	.long	1
	.long	2
	.long	($handlerMap$0$notable_function)@IMGREL
$handlerMap$0$notable_function:
	.long	8
	.long	__rust_panic_type_info@IMGREL
	.long	40
	.long	"?catch$2@?0?notable_function@4HA"@IMGREL
	.long	56
	.long	64
	.long	0
	.long	0
	.long	"?catch$3@?0?notable_function@4HA"@IMGREL
	.long	56
$ip2state$notable_function:
	.long	.Lfunc_begin0@IMGREL
	.long	-1
	.long	.Ltmp0@IMGREL+1
	.long	0
	.long	.Ltmp1@IMGREL+1
	.long	-1
	.long	"?catch$2@?0?notable_function@4HA"@IMGREL
	.long	1
	.long	"?catch$3@?0?notable_function@4HA"@IMGREL
	.long	1
	.section	.text,"xr",one_only,notable_function

	.section	.data,"dw",discard,__rust_panic_type_info
	.globl	__rust_panic_type_info
	.p2align	4
__rust_panic_type_info:
	.quad	"??_7type_info@@6B@"
	.quad	0
	.asciz	"rust_panic"
	.zero	5
9c2f009 (this PR stage1)
	.text
	.def	@feat.00;
	.scl	3;
	.type	0;
	.endef
	.globl	@feat.00
.set @feat.00, 0
	.file	"lib.68a3e9dc-cgu.0"
	.def	notable_function;
	.scl	2;
	.type	32;
	.endef
	.section	.text,"xr",one_only,notable_function
	.globl	notable_function
	.p2align	4, 0x90
notable_function:
.Lfunc_begin0:
.seh_proc notable_function
	.seh_handler __CxxFrameHandler3, @unwind, @except
	pushq	%rbp
	.seh_pushreg %rbp
	subq	$80, %rsp
	.seh_stackalloc 80
	leaq	80(%rsp), %rbp
	.seh_setframe %rbp, 80
	.seh_endprologue
	movq	$-2, -16(%rbp)
	movq	__imp__ZN3std9panicking11panic_count18GLOBAL_PANIC_COUNT17h832a50073c85f225E(%rip), %rax
	movq	(%rax), %rax
	shlq	$1, %rax
	testq	%rax, %rax
	jne	.LBB0_2
	movl	$0, -20(%rbp)
.LBB0_3:
.Ltmp0:
	callq	happy
.Ltmp1:
	movb	$1, %al
	movq	%rax, -32(%rbp)
	movl	$42, %eax
	movq	%rax, -40(%rbp)
.LBB0_5:
$ehgcr_0_5:
	cmpb	$0, -20(%rbp)
	je	.LBB0_6
	callq	_ZN3std9panicking11panic_count8increase17h424b40195d3e6f0fE
.LBB0_6:
	cmpb	$0, -32(%rbp)
	movq	-40(%rbp), %rax
	jne	.LBB0_8
	callq	unfortunate
	movl	$13, %eax
.LBB0_8:
	addq	$80, %rsp
	popq	%rbp
	retq
.LBB0_2:
	callq	_ZN3std9panicking11panic_count22try_decrease_slow_path17hf1721c3fb8e2c7e3E
	movl	%eax, -20(%rbp)
	jmp	.LBB0_3
	.seh_handlerdata
	.long	($cppxdata$notable_function)@IMGREL
	.section	.text,"xr",one_only,notable_function
	.seh_endproc
	.def	"?catch$9@?0?notable_function@4HA";
	.scl	3;
	.type	32;
	.endef
	.p2align	4, 0x90
"?catch$9@?0?notable_function@4HA":
.seh_proc "?catch$9@?0?notable_function@4HA"
	.seh_handler __CxxFrameHandler3, @unwind, @except
.LBB0_9:
	movq	%rdx, 16(%rsp)
	pushq	%rbp
	.seh_pushreg %rbp
	subq	$32, %rsp
	.seh_stackalloc 32
	leaq	80(%rdx), %rbp
	.seh_endprologue
	movq	-8(%rbp), %rcx
	callq	_ZN3std9panicking3try7cleanup17h09cddad23dc8025dE
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	movq	%rax, -32(%rbp)
	leaq	.LBB0_5(%rip), %rax
	addq	$32, %rsp
	popq	%rbp
	retq
	.seh_handlerdata
	.long	($cppxdata$notable_function)@IMGREL
	.section	.text,"xr",one_only,notable_function
	.seh_endproc
	.def	"?catch$10@?0?notable_function@4HA";
	.scl	3;
	.type	32;
	.endef
	.p2align	4, 0x90
"?catch$10@?0?notable_function@4HA":
.seh_proc "?catch$10@?0?notable_function@4HA"
	.seh_handler __CxxFrameHandler3, @unwind, @except
.LBB0_10:
	movq	%rdx, 16(%rsp)
	pushq	%rbp
	.seh_pushreg %rbp
	subq	$32, %rsp
	.seh_stackalloc 32
	leaq	80(%rdx), %rbp
	.seh_endprologue
	xorl	%eax, %eax
	movq	%rax, -32(%rbp)
	xorl	%ecx, %ecx
	callq	_ZN3std9panicking3try7cleanup17h09cddad23dc8025dE
	movq	%rax, -40(%rbp)
	leaq	.LBB0_5(%rip), %rax
	addq	$32, %rsp
	popq	%rbp
	retq
.Lfunc_end0:
	.seh_handlerdata
	.long	($cppxdata$notable_function)@IMGREL
	.section	.text,"xr",one_only,notable_function
	.seh_endproc
	.section	.xdata,"dr",associative,notable_function
	.p2align	2
$cppxdata$notable_function:
	.long	429065506
	.long	2
	.long	($stateUnwindMap$notable_function)@IMGREL
	.long	1
	.long	($tryMap$notable_function)@IMGREL
	.long	5
	.long	($ip2state$notable_function)@IMGREL
	.long	64
	.long	0
	.long	1
$stateUnwindMap$notable_function:
	.long	-1
	.long	0
	.long	-1
	.long	0
$tryMap$notable_function:
	.long	0
	.long	0
	.long	1
	.long	2
	.long	($handlerMap$0$notable_function)@IMGREL
$handlerMap$0$notable_function:
	.long	8
	.long	__rust_panic_type_info@IMGREL
	.long	72
	.long	"?catch$9@?0?notable_function@4HA"@IMGREL
	.long	56
	.long	64
	.long	0
	.long	0
	.long	"?catch$10@?0?notable_function@4HA"@IMGREL
	.long	56
$ip2state$notable_function:
	.long	.Lfunc_begin0@IMGREL
	.long	-1
	.long	.Ltmp0@IMGREL+1
	.long	0
	.long	.Ltmp1@IMGREL+1
	.long	-1
	.long	"?catch$9@?0?notable_function@4HA"@IMGREL
	.long	1
	.long	"?catch$10@?0?notable_function@4HA"@IMGREL
	.long	1
	.section	.text,"xr",one_only,notable_function

	.section	.data,"dw",discard,__rust_panic_type_info
	.globl	__rust_panic_type_info
	.p2align	4
__rust_panic_type_info:
	.quad	"??_7type_info@@6B@"
	.quad	0
	.asciz	"rust_panic"
	.zero	5
diff nightly..stage1
--- nightly.s	2022-07-15 12:57:59.597679100 -0400
+++ stage1.s	2022-07-15 12:57:50.383291800 -0400
@@ -5,7 +5,7 @@
 	.endef
 	.globl	@feat.00
 .set @feat.00, 0
-	.file	"lib.4978488e-cgu.0"
+	.file	"lib.68a3e9dc-cgu.0"
 	.def	notable_function;
 	.scl	2;
 	.type	32;
@@ -19,48 +19,71 @@
 	.seh_handler __CxxFrameHandler3, @unwind, @except
 	pushq	%rbp
 	.seh_pushreg %rbp
-	subq	$48, %rsp
-	.seh_stackalloc 48
-	leaq	48(%rsp), %rbp
-	.seh_setframe %rbp, 48
+	subq	$80, %rsp
+	.seh_stackalloc 80
+	leaq	80(%rsp), %rbp
+	.seh_setframe %rbp, 80
 	.seh_endprologue
 	movq	$-2, -16(%rbp)
+	movq	__imp__ZN3std9panicking11panic_count18GLOBAL_PANIC_COUNT17h832a50073c85f225E(%rip), %rax
+	movq	(%rax), %rax
+	shlq	$1, %rax
+	testq	%rax, %rax
+	jne	.LBB0_2
+	movl	$0, -20(%rbp)
+.LBB0_3:
 .Ltmp0:
 	callq	happy
 .Ltmp1:
+	movb	$1, %al
+	movq	%rax, -32(%rbp)
 	movl	$42, %eax
+	movq	%rax, -40(%rbp)
 .LBB0_5:
-	addq	$48, %rsp
-	popq	%rbp
-	retq
-.LBB0_4:
-$ehgcr_0_4:
+$ehgcr_0_5:
+	cmpb	$0, -20(%rbp)
+	je	.LBB0_6
+	callq	_ZN3std9panicking11panic_count8increase17h424b40195d3e6f0fE
+.LBB0_6:
+	cmpb	$0, -32(%rbp)
+	movq	-40(%rbp), %rax
+	jne	.LBB0_8
 	callq	unfortunate
 	movl	$13, %eax
-	jmp	.LBB0_5
+.LBB0_8:
+	addq	$80, %rsp
+	popq	%rbp
+	retq
+.LBB0_2:
+	callq	_ZN3std9panicking11panic_count22try_decrease_slow_path17hf1721c3fb8e2c7e3E
+	movl	%eax, -20(%rbp)
+	jmp	.LBB0_3
 	.seh_handlerdata
 	.long	($cppxdata$notable_function)@IMGREL
 	.section	.text,"xr",one_only,notable_function
 	.seh_endproc
-	.def	"?catch$2@?0?notable_function@4HA";
+	.def	"?catch$9@?0?notable_function@4HA";
 	.scl	3;
 	.type	32;
 	.endef
 	.p2align	4, 0x90
-"?catch$2@?0?notable_function@4HA":
-.seh_proc "?catch$2@?0?notable_function@4HA"
+"?catch$9@?0?notable_function@4HA":
+.seh_proc "?catch$9@?0?notable_function@4HA"
 	.seh_handler __CxxFrameHandler3, @unwind, @except
-.LBB0_2:
+.LBB0_9:
 	movq	%rdx, 16(%rsp)
 	pushq	%rbp
 	.seh_pushreg %rbp
 	subq	$32, %rsp
 	.seh_stackalloc 32
-	leaq	48(%rdx), %rbp
+	leaq	80(%rdx), %rbp
 	.seh_endprologue
 	movq	-8(%rbp), %rcx
-	callq	_ZN3std9panicking3try7cleanup17h9c87e793fb4cdaabE
-	leaq	.LBB0_4(%rip), %rax
+	callq	_ZN3std9panicking3try7cleanup17h09cddad23dc8025dE
+	movq	%rax, -40(%rbp)
+	xorl	%eax, %eax
+	movq	%rax, -32(%rbp)
+	leaq	.LBB0_5(%rip), %rax
 	addq	$32, %rsp
 	popq	%rbp
 	retq
@@ -68,25 +91,28 @@
 	.long	($cppxdata$notable_function)@IMGREL
 	.section	.text,"xr",one_only,notable_function
 	.seh_endproc
-	.def	"?catch$3@?0?notable_function@4HA";
+	.def	"?catch$10@?0?notable_function@4HA";
 	.scl	3;
 	.type	32;
 	.endef
 	.p2align	4, 0x90
-"?catch$3@?0?notable_function@4HA":
-.seh_proc "?catch$3@?0?notable_function@4HA"
+"?catch$10@?0?notable_function@4HA":
+.seh_proc "?catch$10@?0?notable_function@4HA"
 	.seh_handler __CxxFrameHandler3, @unwind, @except
-.LBB0_3:
+.LBB0_10:
 	movq	%rdx, 16(%rsp)
 	pushq	%rbp
 	.seh_pushreg %rbp
 	subq	$32, %rsp
 	.seh_stackalloc 32
-	leaq	48(%rdx), %rbp
+	leaq	80(%rdx), %rbp
 	.seh_endprologue
+	xorl	%eax, %eax
+	movq	%rax, -32(%rbp)
 	xorl	%ecx, %ecx
-	callq	_ZN3std9panicking3try7cleanup17h9c87e793fb4cdaabE
-	leaq	.LBB0_4(%rip), %rax
+	callq	_ZN3std9panicking3try7cleanup17h09cddad23dc8025dE
+	movq	%rax, -40(%rbp)
+	leaq	.LBB0_5(%rip), %rax
 	addq	$32, %rsp
 	popq	%rbp
 	retq
@@ -105,7 +131,7 @@
 	.long	($tryMap$notable_function)@IMGREL
 	.long	5
 	.long	($ip2state$notable_function)@IMGREL
-	.long	32
+	.long	64
 	.long	0
 	.long	1
 $stateUnwindMap$notable_function:
@@ -122,13 +148,13 @@
 $handlerMap$0$notable_function:
 	.long	8
 	.long	__rust_panic_type_info@IMGREL
-	.long	40
-	.long	"?catch$2@?0?notable_function@4HA"@IMGREL
+	.long	72
+	.long	"?catch$9@?0?notable_function@4HA"@IMGREL
 	.long	56
 	.long	64
 	.long	0
 	.long	0
-	.long	"?catch$3@?0?notable_function@4HA"@IMGREL
+	.long	"?catch$10@?0?notable_function@4HA"@IMGREL
 	.long	56
 $ip2state$notable_function:
 	.long	.Lfunc_begin0@IMGREL
@@ -137,9 +163,9 @@
 	.long	0
 	.long	.Ltmp1@IMGREL+1
 	.long	-1
-	.long	"?catch$2@?0?notable_function@4HA"@IMGREL
+	.long	"?catch$9@?0?notable_function@4HA"@IMGREL
 	.long	1
-	.long	"?catch$3@?0?notable_function@4HA"@IMGREL
+	.long	"?catch$10@?0?notable_function@4HA"@IMGREL
 	.long	1
 	.section	.text,"xr",one_only,notable_function

rustc +stage1 src/lib.rs --crate-type cdylib --target x86_64-pc-windows-msvc -Cpanic=abort -O --emit asm -o stage1.s:

38b7215 (nightly 2022-07-11)
	.text
	.def	@feat.00;
	.scl	3;
	.type	0;
	.endef
	.globl	@feat.00
.set @feat.00, 0
	.file	"lib.4978488e-cgu.0"
	.def	notable_function;
	.scl	2;
	.type	32;
	.endef
	.section	.text,"xr",one_only,notable_function
	.globl	notable_function
	.p2align	4, 0x90
notable_function:
.Lfunc_begin0:
.seh_proc notable_function
	.seh_handler __CxxFrameHandler3, @unwind, @except
	pushq	%rbp
	.seh_pushreg %rbp
	subq	$48, %rsp
	.seh_stackalloc 48
	leaq	48(%rsp), %rbp
	.seh_setframe %rbp, 48
	.seh_endprologue
	movq	$-2, -8(%rbp)
.Ltmp0:
	callq	happy
.Ltmp1:
	movl	$42, %eax
	addq	$48, %rsp
	popq	%rbp
	retq
	.seh_handlerdata
	.long	($cppxdata$notable_function)@IMGREL
	.section	.text,"xr",one_only,notable_function
	.seh_endproc
	.def	"?catch$2@?0?notable_function@4HA";
	.scl	3;
	.type	32;
	.endef
	.p2align	4, 0x90
"?catch$2@?0?notable_function@4HA":
.seh_proc "?catch$2@?0?notable_function@4HA"
	.seh_handler __CxxFrameHandler3, @unwind, @except
.LBB0_2:
	movq	%rdx, 16(%rsp)
	pushq	%rbp
	.seh_pushreg %rbp
	subq	$32, %rsp
	.seh_stackalloc 32
	leaq	48(%rdx), %rbp
	.seh_endprologue
	callq	_ZN4core9panicking15panic_no_unwind17hedc8ed309bafae40E
	ud2
.Lfunc_end0:
	.seh_handlerdata
	.long	($cppxdata$notable_function)@IMGREL
	.section	.text,"xr",one_only,notable_function
	.seh_endproc
	.section	.xdata,"dr",associative,notable_function
	.p2align	2
$cppxdata$notable_function:
	.long	429065506
	.long	2
	.long	($stateUnwindMap$notable_function)@IMGREL
	.long	1
	.long	($tryMap$notable_function)@IMGREL
	.long	4
	.long	($ip2state$notable_function)@IMGREL
	.long	40
	.long	0
	.long	1
$stateUnwindMap$notable_function:
	.long	-1
	.long	0
	.long	-1
	.long	0
$tryMap$notable_function:
	.long	0
	.long	0
	.long	1
	.long	1
	.long	($handlerMap$0$notable_function)@IMGREL
$handlerMap$0$notable_function:
	.long	64
	.long	0
	.long	0
	.long	"?catch$2@?0?notable_function@4HA"@IMGREL
	.long	56
$ip2state$notable_function:
	.long	.Lfunc_begin0@IMGREL
	.long	-1
	.long	.Ltmp0@IMGREL+1
	.long	0
	.long	.Ltmp1@IMGREL+1
	.long	-1
	.long	"?catch$2@?0?notable_function@4HA"@IMGREL
	.long	1
	.section	.text,"xr",one_only,notable_function
9c2f009 (this PR stage1)
	.text
	.def	@feat.00;
	.scl	3;
	.type	0;
	.endef
	.globl	@feat.00
.set @feat.00, 0
	.file	"lib.68a3e9dc-cgu.0"
	.def	notable_function;
	.scl	2;
	.type	32;
	.endef
	.section	.text,"xr",one_only,notable_function
	.globl	notable_function
	.p2align	4, 0x90
notable_function:
.Lfunc_begin0:
.seh_proc notable_function
	.seh_handler __CxxFrameHandler3, @unwind, @except
	pushq	%rbp
	.seh_pushreg %rbp
	pushq	%rsi
	.seh_pushreg %rsi
	subq	$40, %rsp
	.seh_stackalloc 40
	leaq	32(%rsp), %rbp
	.seh_setframe %rbp, 32
	.seh_endprologue
	movq	$-2, (%rbp)
	movq	__imp__ZN3std9panicking11panic_count18GLOBAL_PANIC_COUNT17h832a50073c85f225E(%rip), %rax
	movq	(%rax), %rax
	shlq	$1, %rax
	testq	%rax, %rax
	jne	.LBB0_2
	xorl	%esi, %esi
.LBB0_3:
.Ltmp0:
	callq	happy
.Ltmp1:
	testb	%sil, %sil
	je	.LBB0_6
	callq	_ZN3std9panicking11panic_count8increase17h424b40195d3e6f0fE
.LBB0_6:
	movl	$42, %eax
	addq	$40, %rsp
	popq	%rsi
	popq	%rbp
	retq
.LBB0_2:
	callq	_ZN3std9panicking11panic_count22try_decrease_slow_path17hf1721c3fb8e2c7e3E
	movl	%eax, %esi
	jmp	.LBB0_3
	.seh_handlerdata
	.long	($cppxdata$notable_function)@IMGREL
	.section	.text,"xr",one_only,notable_function
	.seh_endproc
	.def	"?catch$7@?0?notable_function@4HA";
	.scl	3;
	.type	32;
	.endef
	.p2align	4, 0x90
"?catch$7@?0?notable_function@4HA":
.seh_proc "?catch$7@?0?notable_function@4HA"
	.seh_handler __CxxFrameHandler3, @unwind, @except
.LBB0_7:
	movq	%rdx, 16(%rsp)
	pushq	%rbp
	.seh_pushreg %rbp
	pushq	%rsi
	.seh_pushreg %rsi
	subq	$40, %rsp
	.seh_stackalloc 40
	leaq	32(%rdx), %rbp
	.seh_endprologue
	callq	_ZN4core9panicking15panic_no_unwind17h49e55cbf27726099E
	ud2
.Lfunc_end0:
	.seh_handlerdata
	.long	($cppxdata$notable_function)@IMGREL
	.section	.text,"xr",one_only,notable_function
	.seh_endproc
	.section	.xdata,"dr",associative,notable_function
	.p2align	2
$cppxdata$notable_function:
	.long	429065506
	.long	2
	.long	($stateUnwindMap$notable_function)@IMGREL
	.long	1
	.long	($tryMap$notable_function)@IMGREL
	.long	4
	.long	($ip2state$notable_function)@IMGREL
	.long	32
	.long	0
	.long	1
$stateUnwindMap$notable_function:
	.long	-1
	.long	0
	.long	-1
	.long	0
$tryMap$notable_function:
	.long	0
	.long	0
	.long	1
	.long	1
	.long	($handlerMap$0$notable_function)@IMGREL
$handlerMap$0$notable_function:
	.long	64
	.long	0
	.long	0
	.long	"?catch$7@?0?notable_function@4HA"@IMGREL
	.long	72
$ip2state$notable_function:
	.long	.Lfunc_begin0@IMGREL
	.long	-1
	.long	.Ltmp0@IMGREL+1
	.long	0
	.long	.Ltmp1@IMGREL+1
	.long	-1
	.long	"?catch$7@?0?notable_function@4HA"@IMGREL
	.long	1
	.section	.text,"xr",one_only,notable_function
diff nightly..stage1
--- nightly.s	2022-07-15 13:31:36.175628300 -0400
+++ stage1.s	2022-07-15 13:33:55.657374900 -0400
@@ -5,7 +5,7 @@
 	.endef
 	.globl	@feat.00
 .set @feat.00, 0
-	.file	"lib.4978488e-cgu.0"
+	.file	"lib.68a3e9dc-cgu.0"
 	.def	notable_function;
 	.scl	2;
 	.type	32;
@@ -19,40 +19,60 @@
 	.seh_handler __CxxFrameHandler3, @unwind, @except
 	pushq	%rbp
 	.seh_pushreg %rbp
-	subq	$48, %rsp
-	.seh_stackalloc 48
-	leaq	48(%rsp), %rbp
-	.seh_setframe %rbp, 48
+	pushq	%rsi
+	.seh_pushreg %rsi
+	subq	$40, %rsp
+	.seh_stackalloc 40
+	leaq	32(%rsp), %rbp
+	.seh_setframe %rbp, 32
 	.seh_endprologue
-	movq	$-2, -8(%rbp)
+	movq	$-2, (%rbp)
+	movq	__imp__ZN3std9panicking11panic_count18GLOBAL_PANIC_COUNT17h832a50073c85f225E(%rip), %rax
+	movq	(%rax), %rax
+	shlq	$1, %rax
+	testq	%rax, %rax
+	jne	.LBB0_2
+	xorl	%esi, %esi
+.LBB0_3:
 .Ltmp0:
 	callq	happy
 .Ltmp1:
+	testb	%sil, %sil
+	je	.LBB0_6
+	callq	_ZN3std9panicking11panic_count8increase17h424b40195d3e6f0fE
+.LBB0_6:
 	movl	$42, %eax
-	addq	$48, %rsp
+	addq	$40, %rsp
+	popq	%rsi
 	popq	%rbp
 	retq
+.LBB0_2:
+	callq	_ZN3std9panicking11panic_count22try_decrease_slow_path17hf1721c3fb8e2c7e3E
+	movl	%eax, %esi
+	jmp	.LBB0_3
 	.seh_handlerdata
 	.long	($cppxdata$notable_function)@IMGREL
 	.section	.text,"xr",one_only,notable_function
 	.seh_endproc
-	.def	"?catch$2@?0?notable_function@4HA";
+	.def	"?catch$7@?0?notable_function@4HA";
 	.scl	3;
 	.type	32;
 	.endef
 	.p2align	4, 0x90
-"?catch$2@?0?notable_function@4HA":
-.seh_proc "?catch$2@?0?notable_function@4HA"
+"?catch$7@?0?notable_function@4HA":
+.seh_proc "?catch$7@?0?notable_function@4HA"
 	.seh_handler __CxxFrameHandler3, @unwind, @except
-.LBB0_2:
+.LBB0_7:
 	movq	%rdx, 16(%rsp)
 	pushq	%rbp
 	.seh_pushreg %rbp
-	subq	$32, %rsp
-	.seh_stackalloc 32
-	leaq	48(%rdx), %rbp
+	pushq	%rsi
+	.seh_pushreg %rsi
+	subq	$40, %rsp
+	.seh_stackalloc 40
+	leaq	32(%rdx), %rbp
 	.seh_endprologue
-	callq	_ZN4core9panicking15panic_no_unwind17hedc8ed309bafae40E
+	callq	_ZN4core9panicking15panic_no_unwind17h49e55cbf27726099E
 	ud2
 .Lfunc_end0:
 	.seh_handlerdata
@@ -69,7 +89,7 @@
 	.long	($tryMap$notable_function)@IMGREL
 	.long	4
 	.long	($ip2state$notable_function)@IMGREL
-	.long	40
+	.long	32
 	.long	0
 	.long	1
 $stateUnwindMap$notable_function:
@@ -87,8 +107,8 @@
 	.long	64
 	.long	0
 	.long	0
-	.long	"?catch$2@?0?notable_function@4HA"@IMGREL
-	.long	56
+	.long	"?catch$7@?0?notable_function@4HA"@IMGREL
+	.long	72
 $ip2state$notable_function:
 	.long	.Lfunc_begin0@IMGREL
 	.long	-1
@@ -96,7 +116,7 @@
 	.long	0
 	.long	.Ltmp1@IMGREL+1
 	.long	-1
-	.long	"?catch$2@?0?notable_function@4HA"@IMGREL
+	.long	"?catch$7@?0?notable_function@4HA"@IMGREL
 	.long	1
 	.section	.text,"xr",one_only,notable_function

Also clearly useful is comparing the diffs from -Cpanic=unwind to -Cpanic=abort:

38b7215 (nightly 2022-07-11)
--- unwind.s	2022-07-15 13:40:23.427159000 -0400
+++ abort.s	2022-07-15 13:40:17.596473500 -0400
@@ -24,20 +24,14 @@
 	leaq	48(%rsp), %rbp
 	.seh_setframe %rbp, 48
 	.seh_endprologue
-	movq	$-2, -16(%rbp)
+	movq	$-2, -8(%rbp)
 .Ltmp0:
 	callq	happy
 .Ltmp1:
 	movl	$42, %eax
-.LBB0_5:
 	addq	$48, %rsp
 	popq	%rbp
 	retq
-.LBB0_4:
-$ehgcr_0_4:
-	callq	unfortunate
-	movl	$13, %eax
-	jmp	.LBB0_5
 	.seh_handlerdata
 	.long	($cppxdata$notable_function)@IMGREL
 	.section	.text,"xr",one_only,notable_function
@@ -58,38 +52,8 @@
 	.seh_stackalloc 32
 	leaq	48(%rdx), %rbp
 	.seh_endprologue
-	movq	-8(%rbp), %rcx
-	callq	_ZN3std9panicking3try7cleanup17h9c87e793fb4cdaabE
-	leaq	.LBB0_4(%rip), %rax
-	addq	$32, %rsp
-	popq	%rbp
-	retq
-	.seh_handlerdata
-	.long	($cppxdata$notable_function)@IMGREL
-	.section	.text,"xr",one_only,notable_function
-	.seh_endproc
-	.def	"?catch$3@?0?notable_function@4HA";
-	.scl	3;
-	.type	32;
-	.endef
-	.p2align	4, 0x90
-"?catch$3@?0?notable_function@4HA":
-.seh_proc "?catch$3@?0?notable_function@4HA"
-	.seh_handler __CxxFrameHandler3, @unwind, @except
-.LBB0_3:
-	movq	%rdx, 16(%rsp)
-	pushq	%rbp
-	.seh_pushreg %rbp
-	subq	$32, %rsp
-	.seh_stackalloc 32
-	leaq	48(%rdx), %rbp
-	.seh_endprologue
-	xorl	%ecx, %ecx
-	callq	_ZN3std9panicking3try7cleanup17h9c87e793fb4cdaabE
-	leaq	.LBB0_4(%rip), %rax
-	addq	$32, %rsp
-	popq	%rbp
-	retq
+	callq	_ZN4core9panicking15panic_no_unwind17hedc8ed309bafae40E
+	ud2
 .Lfunc_end0:
 	.seh_handlerdata
 	.long	($cppxdata$notable_function)@IMGREL
@@ -103,9 +67,9 @@
 	.long	($stateUnwindMap$notable_function)@IMGREL
 	.long	1
 	.long	($tryMap$notable_function)@IMGREL
-	.long	5
+	.long	4
 	.long	($ip2state$notable_function)@IMGREL
-	.long	32
+	.long	40
 	.long	0
 	.long	1
 $stateUnwindMap$notable_function:
@@ -117,18 +81,13 @@
 	.long	0
 	.long	0
 	.long	1
-	.long	2
+	.long	1
 	.long	($handlerMap$0$notable_function)@IMGREL
 $handlerMap$0$notable_function:
-	.long	8
-	.long	__rust_panic_type_info@IMGREL
-	.long	40
-	.long	"?catch$2@?0?notable_function@4HA"@IMGREL
-	.long	56
 	.long	64
 	.long	0
 	.long	0
-	.long	"?catch$3@?0?notable_function@4HA"@IMGREL
+	.long	"?catch$2@?0?notable_function@4HA"@IMGREL
 	.long	56
 $ip2state$notable_function:
 	.long	.Lfunc_begin0@IMGREL
@@ -139,15 +98,4 @@
 	.long	-1
 	.long	"?catch$2@?0?notable_function@4HA"@IMGREL
 	.long	1
-	.long	"?catch$3@?0?notable_function@4HA"@IMGREL
-	.long	1
 	.section	.text,"xr",one_only,notable_function
-
-	.section	.data,"dw",discard,__rust_panic_type_info
-	.globl	__rust_panic_type_info
-	.p2align	4
-__rust_panic_type_info:
-	.quad	"??_7type_info@@6B@"
-	.quad	0
-	.asciz	"rust_panic"
-	.zero	5
9c2f009 (this PR stage1)
--- unwind.s	2022-07-15 13:41:59.629266400 -0400
+++ abort.s	2022-07-15 13:42:09.911164300 -0400
@@ -19,103 +19,61 @@
 	.seh_handler __CxxFrameHandler3, @unwind, @except
 	pushq	%rbp
 	.seh_pushreg %rbp
-	subq	$80, %rsp
-	.seh_stackalloc 80
-	leaq	80(%rsp), %rbp
-	.seh_setframe %rbp, 80
+	pushq	%rsi
+	.seh_pushreg %rsi
+	subq	$40, %rsp
+	.seh_stackalloc 40
+	leaq	32(%rsp), %rbp
+	.seh_setframe %rbp, 32
 	.seh_endprologue
-	movq	$-2, -16(%rbp)
+	movq	$-2, (%rbp)
 	movq	__imp__ZN3std9panicking11panic_count18GLOBAL_PANIC_COUNT17h832a50073c85f225E(%rip), %rax
 	movq	(%rax), %rax
 	shlq	$1, %rax
 	testq	%rax, %rax
 	jne	.LBB0_2
-	movl	$0, -20(%rbp)
+	xorl	%esi, %esi
 .LBB0_3:
 .Ltmp0:
 	callq	happy
 .Ltmp1:
-	movb	$1, %al
-	movq	%rax, -32(%rbp)
-	movl	$42, %eax
-	movq	%rax, -40(%rbp)
-.LBB0_5:
-$ehgcr_0_5:
-	cmpb	$0, -20(%rbp)
+	testb	%sil, %sil
 	je	.LBB0_6
 	callq	_ZN3std9panicking11panic_count8increase17h424b40195d3e6f0fE
 .LBB0_6:
-	cmpb	$0, -32(%rbp)
-	movq	-40(%rbp), %rax
-	jne	.LBB0_8
-	callq	unfortunate
-	movl	$13, %eax
-.LBB0_8:
-	addq	$80, %rsp
+	movl	$42, %eax
+	addq	$40, %rsp
+	popq	%rsi
 	popq	%rbp
 	retq
 .LBB0_2:
 	callq	_ZN3std9panicking11panic_count22try_decrease_slow_path17hf1721c3fb8e2c7e3E
-	movl	%eax, -20(%rbp)
+	movl	%eax, %esi
 	jmp	.LBB0_3
 	.seh_handlerdata
 	.long	($cppxdata$notable_function)@IMGREL
 	.section	.text,"xr",one_only,notable_function
 	.seh_endproc
-	.def	"?catch$9@?0?notable_function@4HA";
+	.def	"?catch$7@?0?notable_function@4HA";
 	.scl	3;
 	.type	32;
 	.endef
 	.p2align	4, 0x90
-"?catch$9@?0?notable_function@4HA":
-.seh_proc "?catch$9@?0?notable_function@4HA"
+"?catch$7@?0?notable_function@4HA":
+.seh_proc "?catch$7@?0?notable_function@4HA"
 	.seh_handler __CxxFrameHandler3, @unwind, @except
-.LBB0_9:
+.LBB0_7:
 	movq	%rdx, 16(%rsp)
 	pushq	%rbp
 	.seh_pushreg %rbp
-	subq	$32, %rsp
-	.seh_stackalloc 32
-	leaq	80(%rdx), %rbp
+	pushq	%rsi
+	.seh_pushreg %rsi
+	subq	$40, %rsp
+	.seh_stackalloc 40
+	leaq	32(%rdx), %rbp
 	.seh_endprologue
-	movq	-8(%rbp), %rcx
-	callq	_ZN3std9panicking3try7cleanup17h09cddad23dc8025dE
-	movq	%rax, -40(%rbp)
-	xorl	%eax, %eax
-	movq	%rax, -32(%rbp)
-	leaq	.LBB0_5(%rip), %rax
-	addq	$32, %rsp
-	popq	%rbp
-	retq
-	.seh_handlerdata
-	.long	($cppxdata$notable_function)@IMGREL
-	.section	.text,"xr",one_only,notable_function
-	.seh_endproc
-	.def	"?catch$10@?0?notable_function@4HA";
-	.scl	3;
-	.type	32;
-	.endef
-	.p2align	4, 0x90
-"?catch$10@?0?notable_function@4HA":
-.seh_proc "?catch$10@?0?notable_function@4HA"
-	.seh_handler __CxxFrameHandler3, @unwind, @except
-.LBB0_10:
-	movq	%rdx, 16(%rsp)
-	pushq	%rbp
-	.seh_pushreg %rbp
-	subq	$32, %rsp
-	.seh_stackalloc 32
-	leaq	80(%rdx), %rbp
-	.seh_endprologue
-	xorl	%eax, %eax
-	movq	%rax, -32(%rbp)
-	xorl	%ecx, %ecx
-	callq	_ZN3std9panicking3try7cleanup17h09cddad23dc8025dE
-	movq	%rax, -40(%rbp)
-	leaq	.LBB0_5(%rip), %rax
-	addq	$32, %rsp
-	popq	%rbp
-	retq
+	callq	_ZN4core9panicking15panic_no_unwind17h49e55cbf27726099E
+	ud2
 .Lfunc_end0:
 	.seh_handlerdata
 	.long	($cppxdata$notable_function)@IMGREL
@@ -129,9 +87,9 @@
 	.long	($stateUnwindMap$notable_function)@IMGREL
 	.long	1
 	.long	($tryMap$notable_function)@IMGREL
-	.long	5
+	.long	4
 	.long	($ip2state$notable_function)@IMGREL
-	.long	64
+	.long	32
 	.long	0
 	.long	1
 $stateUnwindMap$notable_function:
@@ -143,19 +101,14 @@
 	.long	0
 	.long	0
 	.long	1
-	.long	2
+	.long	1
 	.long	($handlerMap$0$notable_function)@IMGREL
 $handlerMap$0$notable_function:
-	.long	8
-	.long	__rust_panic_type_info@IMGREL
-	.long	72
-	.long	"?catch$9@?0?notable_function@4HA"@IMGREL
-	.long	56
 	.long	64
 	.long	0
 	.long	0
-	.long	"?catch$10@?0?notable_function@4HA"@IMGREL
-	.long	56
+	.long	"?catch$7@?0?notable_function@4HA"@IMGREL
+	.long	72
 $ip2state$notable_function:
 	.long	.Lfunc_begin0@IMGREL
 	.long	-1
@@ -163,17 +116,6 @@
 	.long	0
 	.long	.Ltmp1@IMGREL+1
 	.long	-1
-	.long	"?catch$9@?0?notable_function@4HA"@IMGREL
-	.long	1
-	.long	"?catch$10@?0?notable_function@4HA"@IMGREL
+	.long	"?catch$7@?0?notable_function@4HA"@IMGREL
 	.long	1
 	.section	.text,"xr",one_only,notable_function
-
-	.section	.data,"dw",discard,__rust_panic_type_info
-	.globl	__rust_panic_type_info
-	.p2align	4
-__rust_panic_type_info:
-	.quad	"??_7type_info@@6B@"
-	.quad	0
-	.asciz	"rust_panic"
-	.zero	5
diff diff nightly..stage1 (honestly kinda useless)
--- nightly.diff	2022-07-15 13:40:58.546378000 -0400
+++ stage1.diff	2022-07-15 13:42:22.356174500 -0400
@@ -1,34 +1,96 @@
---- unwind.s	2022-07-15 13:40:23.427159000 -0400
-+++ abort.s	2022-07-15 13:40:17.596473500 -0400
-@@ -24,20 +24,14 @@
- 	leaq	48(%rsp), %rbp
- 	.seh_setframe %rbp, 48
+--- unwind.s	2022-07-15 13:41:59.629266400 -0400
++++ abort.s	2022-07-15 13:42:09.911164300 -0400
+@@ -19,103 +19,61 @@
+ 	.seh_handler __CxxFrameHandler3, @unwind, @except
+ 	pushq	%rbp
+ 	.seh_pushreg %rbp
+-	subq	$80, %rsp
+-	.seh_stackalloc 80
+-	leaq	80(%rsp), %rbp
+-	.seh_setframe %rbp, 80
++	pushq	%rsi
++	.seh_pushreg %rsi
++	subq	$40, %rsp
++	.seh_stackalloc 40
++	leaq	32(%rsp), %rbp
++	.seh_setframe %rbp, 32
  	.seh_endprologue
 -	movq	$-2, -16(%rbp)
-+	movq	$-2, -8(%rbp)
++	movq	$-2, (%rbp)
+ 	movq	__imp__ZN3std9panicking11panic_count18GLOBAL_PANIC_COUNT17h832a50073c85f225E(%rip), %rax
+ 	movq	(%rax), %rax
+ 	shlq	$1, %rax
+ 	testq	%rax, %rax
+ 	jne	.LBB0_2
+-	movl	$0, -20(%rbp)
++	xorl	%esi, %esi
+ .LBB0_3:
  .Ltmp0:
  	callq	happy
  .Ltmp1:
- 	movl	$42, %eax
+-	movb	$1, %al
+-	movq	%rax, -32(%rbp)
+-	movl	$42, %eax
+-	movq	%rax, -40(%rbp)
 -.LBB0_5:
- 	addq	$48, %rsp
- 	popq	%rbp
- 	retq
--.LBB0_4:
--$ehgcr_0_4:
+-$ehgcr_0_5:
+-	cmpb	$0, -20(%rbp)
++	testb	%sil, %sil
+ 	je	.LBB0_6
+ 	callq	_ZN3std9panicking11panic_count8increase17h424b40195d3e6f0fE
+ .LBB0_6:
+-	cmpb	$0, -32(%rbp)
+-	movq	-40(%rbp), %rax
+-	jne	.LBB0_8
 -	callq	unfortunate
 -	movl	$13, %eax
--	jmp	.LBB0_5
+-.LBB0_8:
+-	addq	$80, %rsp
++	movl	$42, %eax
++	addq	$40, %rsp
++	popq	%rsi
+ 	popq	%rbp
+ 	retq
+ .LBB0_2:
+ 	callq	_ZN3std9panicking11panic_count22try_decrease_slow_path17hf1721c3fb8e2c7e3E
+-	movl	%eax, -20(%rbp)
++	movl	%eax, %esi
+ 	jmp	.LBB0_3
  	.seh_handlerdata
  	.long	($cppxdata$notable_function)@IMGREL
  	.section	.text,"xr",one_only,notable_function
-@@ -58,38 +52,8 @@
- 	.seh_stackalloc 32
- 	leaq	48(%rdx), %rbp
+ 	.seh_endproc
+-	.def	"?catch$9@?0?notable_function@4HA";
++	.def	"?catch$7@?0?notable_function@4HA";
+ 	.scl	3;
+ 	.type	32;
+ 	.endef
+ 	.p2align	4, 0x90
+-"?catch$9@?0?notable_function@4HA":
+-.seh_proc "?catch$9@?0?notable_function@4HA"
++"?catch$7@?0?notable_function@4HA":
++.seh_proc "?catch$7@?0?notable_function@4HA"
+ 	.seh_handler __CxxFrameHandler3, @unwind, @except
+-.LBB0_9:
++.LBB0_7:
+ 	movq	%rdx, 16(%rsp)
+ 	pushq	%rbp
+ 	.seh_pushreg %rbp
+-	subq	$32, %rsp
+-	.seh_stackalloc 32
+-	leaq	80(%rdx), %rbp
++	pushq	%rsi
++	.seh_pushreg %rsi
++	subq	$40, %rsp
++	.seh_stackalloc 40
++	leaq	32(%rdx), %rbp
  	.seh_endprologue
 -	movq	-8(%rbp), %rcx
--	callq	_ZN3std9panicking3try7cleanup17h9c87e793fb4cdaabE
--	leaq	.LBB0_4(%rip), %rax
+-	callq	_ZN3std9panicking3try7cleanup17h09cddad23dc8025dE
+-	movq	%rax, -40(%rbp)
+-	xorl	%eax, %eax
+-	movq	%rax, -32(%rbp)
+-	leaq	.LBB0_5(%rip), %rax
 -	addq	$32, %rsp
 -	popq	%rbp
 -	retq
@@ -36,46 +98,49 @@
 -	.long	($cppxdata$notable_function)@IMGREL
 -	.section	.text,"xr",one_only,notable_function
 -	.seh_endproc
--	.def	"?catch$3@?0?notable_function@4HA";
+-	.def	"?catch$10@?0?notable_function@4HA";
 -	.scl	3;
 -	.type	32;
 -	.endef
 -	.p2align	4, 0x90
--"?catch$3@?0?notable_function@4HA":
--.seh_proc "?catch$3@?0?notable_function@4HA"
+-"?catch$10@?0?notable_function@4HA":
+-.seh_proc "?catch$10@?0?notable_function@4HA"
 -	.seh_handler __CxxFrameHandler3, @unwind, @except
--.LBB0_3:
+-.LBB0_10:
 -	movq	%rdx, 16(%rsp)
 -	pushq	%rbp
 -	.seh_pushreg %rbp
 -	subq	$32, %rsp
 -	.seh_stackalloc 32
--	leaq	48(%rdx), %rbp
+-	leaq	80(%rdx), %rbp
 -	.seh_endprologue
+-	xorl	%eax, %eax
+-	movq	%rax, -32(%rbp)
 -	xorl	%ecx, %ecx
--	callq	_ZN3std9panicking3try7cleanup17h9c87e793fb4cdaabE
--	leaq	.LBB0_4(%rip), %rax
+-	callq	_ZN3std9panicking3try7cleanup17h09cddad23dc8025dE
+-	movq	%rax, -40(%rbp)
+-	leaq	.LBB0_5(%rip), %rax
 -	addq	$32, %rsp
 -	popq	%rbp
 -	retq
-+	callq	_ZN4core9panicking15panic_no_unwind17hedc8ed309bafae40E
++	callq	_ZN4core9panicking15panic_no_unwind17h49e55cbf27726099E
 +	ud2
  .Lfunc_end0:
  	.seh_handlerdata
  	.long	($cppxdata$notable_function)@IMGREL
-@@ -103,9 +67,9 @@
+@@ -129,9 +87,9 @@
  	.long	($stateUnwindMap$notable_function)@IMGREL
  	.long	1
  	.long	($tryMap$notable_function)@IMGREL
 -	.long	5
 +	.long	4
  	.long	($ip2state$notable_function)@IMGREL
--	.long	32
-+	.long	40
+-	.long	64
++	.long	32
  	.long	0
  	.long	1
  $stateUnwindMap$notable_function:
-@@ -117,18 +81,13 @@
+@@ -143,19 +101,14 @@
  	.long	0
  	.long	0
  	.long	1
@@ -85,23 +150,28 @@
  $handlerMap$0$notable_function:
 -	.long	8
 -	.long	__rust_panic_type_info@IMGREL
--	.long	40
--	.long	"?catch$2@?0?notable_function@4HA"@IMGREL
+-	.long	72
+-	.long	"?catch$9@?0?notable_function@4HA"@IMGREL
 -	.long	56
  	.long	64
  	.long	0
  	.long	0
--	.long	"?catch$3@?0?notable_function@4HA"@IMGREL
-+	.long	"?catch$2@?0?notable_function@4HA"@IMGREL
- 	.long	56
+-	.long	"?catch$10@?0?notable_function@4HA"@IMGREL
+-	.long	56
++	.long	"?catch$7@?0?notable_function@4HA"@IMGREL
++	.long	72
  $ip2state$notable_function:
  	.long	.Lfunc_begin0@IMGREL
-@@ -139,15 +98,4 @@
  	.long	-1
- 	.long	"?catch$2@?0?notable_function@4HA"@IMGREL
- 	.long	1
--	.long	"?catch$3@?0?notable_function@4HA"@IMGREL
+@@ -163,17 +116,6 @@
+ 	.long	0
+ 	.long	.Ltmp1@IMGREL+1
+ 	.long	-1
+-	.long	"?catch$9@?0?notable_function@4HA"@IMGREL
 -	.long	1
+-	.long	"?catch$10@?0?notable_function@4HA"@IMGREL
++	.long	"?catch$7@?0?notable_function@4HA"@IMGREL
+ 	.long	1
  	.section	.text,"xr",one_only,notable_function
 -
 -	.section	.data,"dw",discard,__rust_panic_type_info

I tried to install a stage1 cross-compiler to check --target x86_64-unknown-linux-gnu as well, but couldn't determine a way to do so without needing a x86_64-linux-gnu-gcc (which I don't have), and attempts to use clang/rust-lld/llvm-ar failed as well.

@CAD97
Copy link
Contributor Author

CAD97 commented Jul 29, 2022

Closing this for now.

@CAD97 CAD97 closed this Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants