-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile libbacktrace with mmapio.c instead of read.c #289
Comments
A PR to implement this would be most welcome! I don't think anything fancy needs to be done, |
Aaron1011
added a commit
to Aaron1011/backtrace-rs
that referenced
this issue
Mar 2, 2020
Fixes rust-lang#289 `mmap` should be available on all platforms we support, so we can use `libbacktrace`'s more efficient mmap-based code.
Aaron1011
added a commit
to Aaron1011/backtrace-rs
that referenced
this issue
Mar 2, 2020
Fixes rust-lang#289 `mmap` should be available on all platforms we support (except Windows), so we can use `libbacktrace`'s more efficient mmap-based code.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently,
backtrace-sys
hardcoded the compilation ofsrc/libbacktrace/read.c
:backtrace-rs/crates/backtrace-sys/build.rs
Line 33 in 190b2f9
However,
libbacktrace
provides a more efficient version ofread.c
(which is used internally to read in chunks of memory) calledmmapio.c
.backtrace-rs
should either provide a feature which compileslibbacktrace
withmmapio.c
, or attempt to detect whether or not themmap
system call is available. Alternatively, theconfigure
script forlibbacktrace
could be used instead of hard-coding paths, since [it already detects ifmmap
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
The text was updated successfully, but these errors were encountered: