Skip to content

Crash on multiple tests for sparc64 platform #28

Closed
@abelcheung

Description

Multiple tests were failing on SPARC64 arch. All of them seems to point to path conversion failure in ucs2_strnlen():

Reading symbols from rifiuti-vista...
(gdb) set args ../test/samples/dir-sample1
(gdb) run
Starting program: /home/debian/rifiuti2/src/rifiuti-vista ../test/samples/dir-sample1

Program received signal SIGBUS, Bus error.
0x00000100000050c8 in ucs2_strnlen (str=0x10000208887, max_sz=260) at utils.c:429
429              for (i=0; (i<max_sz) && str[i]; i++) {}
(gdb) bt full
#0  0x00000100000050c8 in ucs2_strnlen (str=0x10000208887, max_sz=260) at utils.c:429
        i = 0
#1  0x00000100000057dc in conv_path_to_utf8_with_tmpl (path=0x10000208887 "C", from_enc=0x0, tmpl=0x10000008530 "<\\u%04X>",
    read=0x7feffffee10, st=0x10000200ee0 <exit_status>) at utils.c:552
        u8_path = 0x6542b679 <error: Cannot access memory at address 0x6542b679>
        i_ptr = 0x1 <error: Cannot access memory at address 0x1>
        o_ptr = 0x2 <error: Cannot access memory at address 0x2>
        result = 0x0
        len = 8791798050296
        r_total = 172000000
        rbyte = 22517998136852480
        wbyte = 0
        status = 336
        in_ch_width = 2
        out_ch_width = 8
        conv = 0x1000000347c <populate_record_data+744>
        __func__ = "conv_path_to_utf8_with_tmpl"
#2  0x0000010000003540 in populate_record_data (buf=0x10000208870, version=1, pathlen=260, erraneous=1) at rifiuti-vista.c:198
        record = 0x1000020ad20
        read = 8791798050488
        __func__ = "populate_record_data"
#3  0x00000100000037fc in parse_record_cb (index_file=0x10000208130 "../test/samples/dir-sample1/$IYAR1YY.exe",
    recordlist=0x7fefffff0b0) at rifiuti-vista.c:252
        record = 0x1000020a940
        basename = 0x1000020abc0 "$IYAR1YY.exe"
        version = 1
        pathlen = 260
        bufsize = 543
        buf = 0x10000208870
        validate_st = R2_OK
        __func__ = "parse_record_cb"
#4  0xfffff80100389790 in ?? ()
No symbol table info available.
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) p str
$1 = (const gunichar2 *) 0x10000208887
(gdb) p sizeof(str)
$2 = 8

Most likely the string was treated as (char *) so it was truncated early, and fails conversion to (gunichar *) later.

This is very likely the reason the relavant Debian package stays at 0.6.1, not upgrading to 0.7.0.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions