librsvg2段错误,大家帮忙看看这怎么解决?

gdb 的 bt 结果,无视那些让我装新的 debuginfo 信息吧。应该用不到。
(gdb) run
Starting program: /usr/bin/rsvg-convert --format=png --output=diagram.png SVG_logo.svg
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.27-8.fc28.mips64el
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x000000fff71585fc in strlen () from /lib64/libc.so.6
Missing separate debuginfos, use: dnf debuginfo-install bzip2-libs-1.0.6-26.fc28.mips64el cairo-1.15.12-1.fc28.mips64el expat-2.2.5-3.fc28.mips64el fontconfig-2.13.0-3.fc28.mips64el freetype-2.8-10.fc28.mips64el fribidi-0.19.7-7.fc28.mips64el gdk-pixbuf2-2.36.12-1.fc28.mips64el glib2-2.56.1-1.fc28.mips64el graphite2-1.3.10-5.fc28.mips64el harfbuzz-1.7.5-3.fc28.mips64el libX11-1.6.5-7.fc28.mips64el libXau-1.0.8-11.fc28.mips64el libXext-1.3.3-8.fc28.mips64el libXrender-0.9.10-5.fc28.mips64el libblkid-2.32-2.fc28.mips64el libcroco-0.6.12-4.fc28.mips64el libdatrie-0.2.9-7.fc28.mips64el libffi-3.1-16.fc28.mips64el libgcc-8.0.1-0.23.fc28.mips64el libmount-2.32-2.fc28.mips64el libpng-1.6.34-3.fc28.mips64el libselinux-2.7-13.fc28.mips64el libthai-0.1.27-2.fc28.mips64el libuuid-2.32-2.fc28.mips64el libxcb-1.13-2.fc28.mips64el libxml2-2.9.7-4.fc28.mips64el pango-1.42.1-1.fc28.mips64el pcre-8.42-1.fc28.mips64el pcre2-10.31-4.fc28.mips64el pixman-0.34.0-6.fc28.mips64el xz-libs-5.2.3-7.fc28.mips64el zlib-1.2.11-7.fc28.mips64el
(gdb) backtrace
#0 0x000000fff71585fc in strlen () at /lib64/libc.so.6
#1 0x000000fff7f1c5c8 in std::ffi::c_str::CStr::from_ptr (ptr=0x2 <error: Cannot access memory at address 0x2>)
at /builddir/build/BUILD/rustc-1.24.1-src/src/libstd/ffi/c_str.rs:902
#2 0x000000fff7f1c5c8 in rsvg_internals::util::utf8_cstr (s=0x2 <error: Cannot access memory at address 0x2>) at rsvg_internals/src/util.rs:32
#3 0x000000fff7f1c5c8 in rsvg_length_parse (string=0x2 <error: Cannot access memory at address 0x2>, dir=(unknown: 2788163584)) at rsvg_internals/src/length.rs:103
#4 0x000000fff7e6f2a4 in rsvg_state_init (state=0xaaaaaee030) at librsvg/rsvg-styles.c:103
#5 0x000000fff7e71658 in rsvg_state_new () at librsvg/rsvg-styles.c:198
#6 0x000000fff7f32050 in rsvg_internals::node::boxed_node_new (node_type=<optimized out>, raw_parent=<optimized out>, node_impl=...) at rsvg_internals/src/drawing_ctx.rs:255
#7 0x000000fff7f38d8c in rsvg_node_svg_new (raw_parent=<optimized out>) at rsvg_internals/src/structure.rs:437
#8 0x000000fff7e55ca4 in rsvg_standard_element_start (handle=<optimized out>, name=<optimized out>, atts=<optimized out>) at librsvg/rsvg-base.c:443
#9 0x000000fff7e58744 in rsvg_start_element (data=<optimized out>, name=<optimized out>, atts=<optimized out>) at librsvg/rsvg-base.c:824
#10 0x000000fff7a67f4c in xmlParseStartTag () at /lib64/libxml2.so.2
#11 0x000000fff7a6de64 in xmlParseElement () at /lib64/libxml2.so.2
#12 0x000000fff7a6e774 in xmlParseDocument () at /lib64/libxml2.so.2
#13 0x000000fff7e58bb8 in rsvg_handle_read_stream_sync (handle=<optimized out>, stream=<optimized out>, cancellable=<optimized out>, error=<optimized out>)
at librsvg/rsvg-base.c:1566
#14 0x000000fff7e6cc78 in rsvg_handle_new_from_stream_sync (input_stream=0xaaaaac4550, base_file=0xaaaaad3d80, flags=<optimized out>, cancellable=0x0, error=0xffffbfefe8)
at librsvg/rsvg-handle.c:561
#15 0x000000aaaaaaa3a8 in main (argc=<optimized out>, argv=<optimized out>) at rsvg-convert.c:292
(gdb)

#3 开始,这个字符串就出错了。
#4  的 librsvg/rsvg-styles.c里面是这么写的。
用 sed 截取:
[jiangtao@ls3a librsvg-2.42.3]$ sed -n "100,106p" librsvg/rsvg-styles.c
state->fill = rsvg_paint_server_parse (NULL, "#000");
state->fill_opacity = 0xff;
state->stroke_opacity = 0xff;
state->stroke_width = rsvg_length_parse ("1", LENGTH_DIR_BOTH);
state->miter_limit = 4;
state->cap = CAIRO_LINE_CAP_BUTT;
state->join = CAIRO_LINE_JOIN_MITER;
[jiangtao@ls3a librsvg-2.42.3]$
也就是说给 rsvg_length_parse 传递过去的直接就是一个字符串。但是 rsvg_length_parse 收到就出错了。
而这个地方的代码实现是 rustc 。
这是什么原因?是不能这么传递 string ,还是因为 rustc 过渡出错了?
已邀请:

要回复问题请先登录注册