Alpine Linux causes a segmentation fault
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- linux, rust
- Lĩnh vực
- desktop, operating-systems
Hướng nghiên cứu
Reproduce the crash with cargo run --example networking on Alpine Linux and inspect src/lib.rs around load_xlib_with_error_hook at lines 169-171 and its initializer at line 196. Use the provided gdb backtrace to investigate the null error representation; done means the networking example no longer segfaults on Alpine.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Seen in winit-block-on:
$ cargo run --example networking
Finished dev [unoptimized + debuginfo] target(s) in 0.08s
Running `target/debug/examples/networking`
[1] 17749 segmentation fault cargo run --example networking
gdb gives this backtrace:
(gdb) bt
#0 std::io::error::{impl#8}::fmt () at library/std/src/io/error.rs:951
#1 0x00007ffff7b16a1c in core::fmt::rt::Argument::fmt () at library/core/src/fmt/rt.rs:138
#2 core::fmt::write () at library/core/src/fmt/mod.rs:1094
#3 0x00007ffff7b0c054 in core::fmt::Write::write_fmt<alloc::string::String> ()
at library/core/src/fmt/mod.rs:192
#4 alloc::fmt::format::format_inner () at library/alloc/src/fmt.rs:610
#5 0x00007ffff76c6cb5 in alloc::fmt::format::{closure#0} ()
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/fmt.rs:614
#6 0x00007ffff76c66de in core::option::Option<&str>::map_or_else<&str, alloc::string::String, alloc::fmt::format::{closure_env#0}, fn(&str) -> alloc::string::String> (self=...,
default=..., f=0x0)
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/option.rs:1181
#7 0x00007ffff76c6c4f in alloc::fmt::format (args=...)
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/fmt.rs:614
#8 0x00007ffff76c73bf in tiny_xlib::XLIB___rust_ctor___ctor::initer::load_xlib_with_error_hook::error<std::io::error::Error> (e=...) at src/lib.rs:169
#9 0x00007ffff76c5fd3 in core::ops::function::FnOnce::call_once<fn(std::io::error::Error) -> std::io::error::Error, (std::io::error::Error)> ()
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250
#10 0x00007ffff76c6a09 in core::result::Result<tiny_xlib::ffi::Xlib, std::io::error::Error>::map_err<tiny_xlib::ffi::Xlib, std::io::error::Error, std::io::error::Error, fn(std::io::error::Error) -> std::io::error::Error> (self=..., op=0x0)
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:829
#11 0x00007ffff76c71e1 in tiny_xlib::XLIB___rust_ctor___ctor::initer::load_xlib_with_error_hook () at src/lib.rs:171
#12 0x00007ffff70d9fbe in tiny_xlib::XLIB___rust_ctor___ctor::initer () at src/lib.rs:196
#13 0x00007ffff7af9555 in libc_start_init () at ../src_musl/src/env/__libc_start_main.c:64
#14 0x00007ffff7af957a in libc_start_main_stage2 ()
at ../src_musl/src/env/__libc_start_main.c:92
#15 0x00007ffff70da064 in _start ()
Setting a breakpoint inside of the error printer gives me this:
(gdb) print e
$1 = std::io::error::Error {repr: std::io::error::repr_bitpacked::Repr (core::ptr::non_null::NonNull<()> {pointer: 0x0}, core::marker::PhantomData<std::io::error::ErrorData<alloc::boxed::Box<std::io::error::Custom, alloc::alloc::Global>>>)}
So it's some kind of weird niche issue. My guess is that somehow the dynamically linked functions are null when Alpine links them together, thus causing Rust to assume that it's somehow gotten a null IO error.
- Ngôn ngữ chính
- Rust
- Star
- 7
- Fork
- 2
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của rust-windowing/tiny-xlib
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
rust-windowing/tiny-xlib#16 · 3 bình luận ·
-
Memory leak with opened libraryĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
rust-windowing/tiny-xlib#15 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
rust-windowing/tiny-xlib#11 ·
-
Flaky CI TestĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
Tất cả issue của rust-windowing/tiny-xlib
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
trezor/trezor-firmware#7997 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
smol-machines/smolvm#1489 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày