Skip to content

Inline Frame Regression on Linux in 0.3.17 #186

Closed
@jan-auer

Description

@jan-auer

In 0.3.17 function names for inline frames are now incorrectly showing the name of the symbol they are inlined into. Repro case added below.

I haven't looked at the details, but it might have to do with #185. It is correct that the symbol table often contains better names than DWARF debug info for regular symbols, but this is obviously not the case for inline symbols.

Repro Code
use failure::err_msg;

#[inline(always)]
fn inline2() {
    println!("{}", err_msg("foo").backtrace());
}

#[inline(never)]
fn not_inline() {
    inline2()
}

#[inline(always)]
fn inline1() {
    not_inline()
}

fn main() {
    inline1()
}

Expected Backtrace: (truncated)

   2: <failure::error::error_impl::ErrorImpl as core::convert::From<F>>::from::h3bae66c036570137 (0x55a12174de62)
             at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/failure-0.1.5/src/error/error_impl.rs:19
      <failure::error::Error as core::convert::From<F>>::from::hc7d0d62dae166cea
             at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/failure-0.1.5/src/error/mod.rs:36
      failure::error_message::err_msg::he322d3ed9409189a
             at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/failure-0.1.5/src/error_message.rs:12
      rust::inline2::h562e5687710b6a71
             at src/main.rs:5
      rust::not_inline::h16f5b6019e5f0815
             at src/main.rs:10

Actual Backtrace: (truncated)

   2: rust::not_inline::hd7ebd5cbb18d0349 (0x55e3895a4c72)
             at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/failure-0.1.5/src/error/error_impl.rs:19
      rust::not_inline::hd7ebd5cbb18d0349
             at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/failure-0.1.5/src/error/mod.rs:36
      rust::not_inline::hd7ebd5cbb18d0349
             at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/failure-0.1.5/src/error_message.rs:12
      rust::not_inline::hd7ebd5cbb18d0349
             at src/main.rs:5
      rust::not_inline::hd7ebd5cbb18d0349
             at src/main.rs:10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions