Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Feb 2021 14:53:07 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 253557] lang/rust: unbreak RUST_BACKTRACE
Message-ID:  <bug-253557-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D253557

            Bug ID: 253557
           Summary: lang/rust: unbreak RUST_BACKTRACE
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
               URL: https://github.com/rust-lang/rust/issues/78184
                OS: Any
            Status: New
          Keywords: patch
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: rust@FreeBSD.org
          Reporter: jbeich@FreeBSD.org
                CC: cem@freebsd.org
             Flags: maintainer-feedback?(rust@FreeBSD.org)
          Assignee: rust@FreeBSD.org

Created attachment 222489
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D222489&action=
=3Dedit
v1

Let's backport upstream fixes to improve debugging experience outside of
lldb/gdb. I didn't try hard to figure out which rust-libc copy (out of 3) is
actually used by gimli.

$ rustc foo.rs
$ cat foo.rs
fn main() {
    panic!("test");
}

Before:

  $ RUST_BACKTRACE=3D1 ./foo
  thread 'main' panicked at 'test', foo.rs:2:5
  stack backtrace:
  note: Some details are omitted, run with `RUST_BACKTRACE=3Dfull` for a ve=
rbose
backtrace.

  $ RUST_BACKTRACE=3Dfull ./foo
  thread 'main' panicked at 'test', foo.rs:2:5
  stack backtrace:
     0:          0x103b88c - <unknown>
     1:          0x106482e - <unknown>
     2:          0x103e0d3 - <unknown>
     3:          0x105142d - <unknown>
     4:          0x1051109 - <unknown>
     5:          0x1051a55 - <unknown>
     6:          0x1037067 - <unknown>
     7:          0x1036c88 - <unknown>
     8:          0x1036faf - <unknown>
     9:          0x1036dac - <unknown>
    10:          0x1036e5a - <unknown>
    11:          0x1036cbd - <unknown>
    12:          0x1037810 - <unknown>
    13:          0x1053897 - <unknown>
    14:          0x10377e6 - <unknown>
    15:          0x1036dd2 - <unknown>
    16:          0x1036152 - <unknown>

After:

  $ RUST_BACKTRACE=3D1 ./foo
  thread 'main' panicked at 'test', foo.rs:2:5
  stack backtrace:
     0: std::panicking::begin_panic
     1: foo::main
     2: core::ops::function::FnOnce::call_once
  note: Some details are omitted, run with `RUST_BACKTRACE=3Dfull` for a ve=
rbose
backtrace.

  $ RUST_BACKTRACE=3Dfull ./foo
  thread 'main' panicked at 'test', foo.rs:2:5
  stack backtrace:
     0:          0x103922c -
<std::sys_common::backtrace::_print::DisplayBacktrace as
core::fmt::Display>::fmt::hfae40981c683065e
     1:          0x106755e - core::fmt::write::h0001cddca5707f2f
     2:          0x103fc13 - std::io::Write::write_fmt::h5065311bc325393f
     3:          0x105388d -
std::panicking::default_hook::{{closure}}::h46488dcc7f63ea2a
     4:          0x1053442 - std::panicking::default_hook::hab86e3010cd23dc8
     5:          0x1053f33 -
std::panicking::rust_panic_with_hook::h7e1eec77b252f630
     6:          0x1036e77 -
std::panicking::begin_panic::{{closure}}::h48d3e795edb17de3
     7:          0x1036a98 -
std::sys_common::backtrace::__rust_end_short_backtrace::h037ac64f2211a0e4
     8:          0x1036dbf - std::panicking::begin_panic::h8dc7b9a5c0a89bc8
     9:          0x1036bbc - foo::main::h2db1313a64510850
    10:          0x1036c5a -
core::ops::function::FnOnce::call_once::hdcf13a72d77bd803
    11:          0x1036acd -
std::sys_common::backtrace::__rust_begin_short_backtrace::h2e16a820ba2cd26c
    12:          0x1037620 -
std::rt::lang_start::{{closure}}::h0031a264716041f7
    13:          0x105431b - std::rt::lang_start_internal::h6b2b475d129f0fdf
    14:          0x10375f6 - std::rt::lang_start::h998db6b74ebc2b8f
    15:          0x1036be2 - main
    16:          0x1035fa2 - _start
                                 at /usr/src/lib/csu/amd64/crt1.c:76:7

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-253557-7788>