Эх сурвалжийг харах

Merge tag 'v0.2.5' into bump-to-0_2_5

Samuka007 3 долоо хоног өмнө
parent
commit
804180b8ce

+ 11 - 11
Cargo.lock

@@ -12,15 +12,15 @@ dependencies = [
 
 [[package]]
 name = "compiler_builtins"
-version = "0.1.121"
+version = "0.1.139"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ce956e6dc07082ec481f0935a51e83b343f8ca51be560452c0ebf830d0bdf5a5"
+checksum = "7925a77545f37a18e152a4aeaeb9a220309022067cafcfa2ecebe9ec55d36ccb"
 
 [[package]]
 name = "gimli"
-version = "0.31.0"
+version = "0.31.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64"
+checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
 dependencies = [
  "compiler_builtins",
  "rustc-std-workspace-alloc",
@@ -29,9 +29,9 @@ dependencies = [
 
 [[package]]
 name = "libc"
-version = "0.2.158"
+version = "0.2.164"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439"
+checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f"
 
 [[package]]
 name = "panic_abort_no_debuginfo"
@@ -42,15 +42,15 @@ dependencies = [
 
 [[package]]
 name = "rustc-std-workspace-alloc"
-version = "1.0.0"
+version = "1.0.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ff66d57013a5686e1917ed6a025d54dd591fcda71a41fe07edf4d16726aefa86"
+checksum = "f9d441c3b2ebf55cebf796bfdc265d67fa09db17b7bb6bd4be75c509e1e8fec3"
 
 [[package]]
 name = "rustc-std-workspace-core"
-version = "1.0.0"
+version = "1.0.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1956f5517128a2b6f23ab2dadf1a976f4f5b27962e7724c2bf3d45e539ec098c"
+checksum = "aa9c45b374136f52f2d6311062c7146bff20fec063c3f5d46a410bd937746955"
 
 [[package]]
 name = "spin"
@@ -76,7 +76,7 @@ dependencies = [
 
 [[package]]
 name = "unwinding"
-version = "0.2.3"
+version = "0.2.5"
 dependencies = [
  "compiler_builtins",
  "gimli",

+ 1 - 1
Cargo.toml

@@ -1,6 +1,6 @@
 [package]
 name = "unwinding"
-version = "0.2.3"
+version = "0.2.5"
 authors = ["Gary Guo <gary@garyguo.net>"]
 edition = "2021"
 license = "MIT OR Apache-2.0"

+ 2 - 0
src/unwinder/arch/aarch64.rs

@@ -63,6 +63,7 @@ macro_rules! save {
     (gp$(, $fp:ident)?) => {
         // No need to save caller-saved registers here.
         core::arch::naked_asm!(
+            maybe_cfi!(".cfi_startproc"),
             "stp x29, x30, [sp, -16]!",
             maybe_cfi!("
             .cfi_def_cfa_offset 16
@@ -98,6 +99,7 @@ macro_rules! save {
             .cfi_restore x30
             "),
             "ret",
+            maybe_cfi!(".cfi_endproc"),
         );
     };
     (maybesavefp(fp)) => {

+ 8 - 0
src/unwinder/arch/riscv32.rs

@@ -82,7 +82,10 @@ macro_rules! code {
         "
     };
     (save_fp) => {
+        // arch option manipulation needed due to LLVM/Rust bug, see rust-lang/rust#80608
         "
+        .option push
+        .option arch, +d
         fsd fs0, 0xC0(sp)
         fsd fs1, 0xC8(sp)
         fsd fs2, 0x110(sp)
@@ -95,6 +98,7 @@ macro_rules! code {
         fsd fs9, 0x148(sp)
         fsd fs10, 0x150(sp)
         fsd fs11, 0x158(sp)
+        .option pop
         "
     };
     (restore_gp) => {
@@ -175,6 +179,7 @@ pub extern "C-unwind" fn save_context(f: extern "C" fn(&mut Context, *mut ()), p
     #[cfg(target_feature = "d")]
     unsafe {
         core::arch::naked_asm!(
+            maybe_cfi!(".cfi_startproc"),
             "
             mv t0, sp
             add sp, sp, -0x190
@@ -194,11 +199,13 @@ pub extern "C-unwind" fn save_context(f: extern "C" fn(&mut Context, *mut ()), p
             maybe_cfi!(".cfi_def_cfa_offset 0"),
             maybe_cfi!(".cfi_restore ra"),
             "ret",
+            maybe_cfi!(".cfi_endproc"),
         );
     }
     #[cfg(not(target_feature = "d"))]
     unsafe {
         core::arch::naked_asm!(
+            maybe_cfi!(".cfi_startproc"),
             "
             mv t0, sp
             add sp, sp, -0x90
@@ -217,6 +224,7 @@ pub extern "C-unwind" fn save_context(f: extern "C" fn(&mut Context, *mut ()), p
             maybe_cfi!(".cfi_def_cfa_offset 0"),
             maybe_cfi!(".cfi_restore ra"),
             "ret",
+            maybe_cfi!(".cfi_endproc")
         );
     }
 }

+ 8 - 0
src/unwinder/arch/riscv64.rs

@@ -82,7 +82,10 @@ macro_rules! code {
         "
     };
     (save_fp) => {
+        // arch option manipulation needed due to LLVM/Rust bug, see rust-lang/rust#80608
         "
+        .option push
+        .option arch, +d
         fsd fs0, 0x140(sp)
         fsd fs1, 0x148(sp)
         fsd fs2, 0x190(sp)
@@ -95,6 +98,7 @@ macro_rules! code {
         fsd fs9, 0x1C8(sp)
         fsd fs10, 0x1D0(sp)
         fsd fs11, 0x1D8(sp)
+        .option pop
         "
     };
     (restore_gp) => {
@@ -175,6 +179,7 @@ pub extern "C-unwind" fn save_context(f: extern "C" fn(&mut Context, *mut ()), p
     #[cfg(target_feature = "d")]
     unsafe {
         core::arch::naked_asm!(
+            maybe_cfi!(".cfi_startproc"),
             "
             mv t0, sp
             add sp, sp, -0x210
@@ -194,11 +199,13 @@ pub extern "C-unwind" fn save_context(f: extern "C" fn(&mut Context, *mut ()), p
             maybe_cfi!(".cfi_def_cfa_offset 0"),
             maybe_cfi!(".cfi_restore ra"),
             "ret",
+            maybe_cfi!(".cfi_endproc"),
         );
     }
     #[cfg(not(target_feature = "d"))]
     unsafe {
         core::arch::naked_asm!(
+            maybe_cfi!(".cfi_startproc"),
             "
             mv t0, sp
             add sp, sp, -0x110
@@ -217,6 +224,7 @@ pub extern "C-unwind" fn save_context(f: extern "C" fn(&mut Context, *mut ()), p
             maybe_cfi!(".cfi_def_cfa_offset 0"),
             maybe_cfi!(".cfi_restore ra"),
             "ret",
+            maybe_cfi!(".cfi_endproc"),
         );
     }
 }

+ 2 - 0
src/unwinder/arch/x86.rs

@@ -61,6 +61,7 @@ pub extern "C-unwind" fn save_context(f: extern "C" fn(&mut Context, *mut ()), p
     // No need to save caller-saved registers here.
     unsafe {
         core::arch::naked_asm!(
+            maybe_cfi!(".cfi_startproc"),
             "sub esp, 52",
             maybe_cfi!(".cfi_def_cfa_offset 56"),
             "
@@ -97,6 +98,7 @@ pub extern "C-unwind" fn save_context(f: extern "C" fn(&mut Context, *mut ()), p
             ",
             maybe_cfi!(".cfi_def_cfa_offset 4"),
             "ret",
+            maybe_cfi!(".cfi_endproc"),
         );
     }
 }

+ 3 - 1
src/unwinder/arch/x86_64.rs

@@ -63,6 +63,7 @@ pub extern "C-unwind" fn save_context(f: extern "C" fn(&mut Context, *mut ()), p
     // No need to save caller-saved registers here.
     unsafe {
         core::arch::naked_asm!(
+            maybe_cfi!(".cfi_startproc"),
             "sub rsp, 0x98",
             maybe_cfi!(".cfi_def_cfa_offset 0xA0"),
             "
@@ -91,7 +92,8 @@ pub extern "C-unwind" fn save_context(f: extern "C" fn(&mut Context, *mut ()), p
             add rsp, 0x98
             ",
             maybe_cfi!(".cfi_def_cfa_offset 8"),
-            "ret"
+            "ret",
+            maybe_cfi!(".cfi_endproc"),
         );
     }
 }