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
Currently,
backtrace-syshardcoded the compilation ofsrc/libbacktrace/read.c:backtrace-rs/crates/backtrace-sys/build.rs
Line 33 in 190b2f9
However,
libbacktraceprovides a more efficient version ofread.c(which is used internally to read in chunks of memory) calledmmapio.c.backtrace-rsshould either provide a feature which compileslibbacktracewithmmapio.c, or attempt to detect whether or not themmapsystem call is available. Alternatively, theconfigurescript forlibbacktracecould be used instead of hard-coding paths, since [it already detects ifmmapis 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