Skip to content

Compile libbacktrace with mmapio.c instead of read.c #289

Closed
@Aaron1011

Description

@Aaron1011

Currently, backtrace-sys hardcoded the compilation of src/libbacktrace/read.c:

.file("src/libbacktrace/read.c")

However, libbacktrace provides a more efficient version of read.c (which is used internally to read in chunks of memory) called mmapio.c.

backtrace-rs should either provide a feature which compiles libbacktrace with mmapio.c, or attempt to detect whether or not the mmap system call is available. Alternatively, the configure script for libbacktrace could be used instead of hard-coding paths, since [it already detects if mmap is available[(https://github.com/ianlancetaylor/libbacktrace/blob/559ab7cab4a6002124863d493bd09a376a690e76/configure.ac#L285-L303). I'm not sure if there are any issues preventing this script from being used.

This will also fix rust-lang/rust#69151, since we will no longe be hitting the bug in read.c

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