Skip to content

Provide a non-empty error callback to libbacktrace #290

Closed
@Aaron1011

Description

@Aaron1011

Currently, the error callback function passed to libbacktrace does nothing:

extern "C" fn error_cb(_data: *mut c_void, _msg: *const c_char, _errnum: c_int) {
// do nothing for now
}

Doing something here (printing an error, or just setting a flag that makes backtrace-rs calls fail) will make it much easier to debug issues like rust-lang/rust#69151 - it took me quite a while to realize that the memory corruption I was seeing was the result of libbacktrace intentionally freeing memory.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions