Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Nov 2015 01:18:51 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 204651] ls --libxo html -l crashes in xo_format_string_direct()
Message-ID:  <bug-204651-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204651

            Bug ID: 204651
           Summary: ls --libxo html -l crashes in
                    xo_format_string_direct()
           Product: Base System
           Version: 11.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: jbeich@FreeBSD.org

$ lldb =ls -- --libxo html -l
(lldb) target create "/bin/ls"
Current executable set to '/bin/ls' (x86_64).
(lldb) settings set -- target.run-args  "--libxo" "html" "-l"
(lldb) r
Process 78182 launching
Process 78182 launched: '/bin/ls' (x86_64)
<div class="line"><div class="label">total</div><div class="text"> </div><div
class="data" data-tag="total-blocks">204</div></div>Process 78182 stopped
* thread #1: tid = 100311, 0x000000080083e8b4
libxo.so.0`xo_format_string_direct(xop=0x000000080062c910,
xbp=0x000000080062c958, flags=4096, wcp=0x0000000000000000,
cp=0x0000000000000004, len=-1, max=-1, need_enc=2, have_enc=2) + 180 at
libxo.c:2291, stop reason = signal SIGSEGV: invalid address (fault address:
0x4)
    frame #0: 0x000000080083e8b4
libxo.so.0`xo_format_string_direct(xop=0x000000080062c910,
xbp=0x000000080062c958, flags=4096, wcp=0x0000000000000000,
cp=0x0000000000000004, len=-1, max=-1, need_enc=2, have_enc=2) + 180 at
libxo.c:2291
   2288             break;
   2289
   2290         if (cp) {
-> 2291             if (*cp == '\0')
   2292                 break;
   2293             if ((flags & XFF_UNESCAPE) && (*cp == '\\' || *cp == '%'))
{
   2294                 cp += 1;
(lldb) bt
* thread #1: tid = 100311, 0x000000080083e8b4
libxo.so.0`xo_format_string_direct(xop=0x000000080062c910,
xbp=0x000000080062c958, flags=4096, wcp=0x0000000000000000,
cp=0x0000000000000004, len=-1, max=-1, need_enc=2, have_enc=2) + 180 at
libxo.c:2291, stop reason = signal SIGSEGV: invalid address (fault address:
0x4)
  * frame #0: 0x000000080083e8b4
libxo.so.0`xo_format_string_direct(xop=0x000000080062c910,
xbp=0x000000080062c958, flags=4096, wcp=0x0000000000000000,
cp=0x0000000000000004, len=-1, max=-1, need_enc=2, have_enc=2) + 180 at
libxo.c:2291
    frame #1: 0x000000080083f40e
libxo.so.0`xo_format_string(xop=0x000000080062c910, xbp=0x000000080062c958,
flags=4096, xfp=0x00007fffffffc8a0) + 1006 at libxo.c:2555
    frame #2: 0x000000080083d07e
libxo.so.0`xo_do_format_field(xop=0x000000080062c910, xbp=0x000000080062c958,
fmt=0x0000000000408121, flen=4, flags=4096) + 2798 at libxo.c:3071
    frame #3: 0x0000000800832cb7
libxo.so.0`xo_buf_append_div(xop=0x000000080062c910, class=0x00000008008464e5,
flags=4096, name=0x000000000040811c, nlen=4, value=0x0000000000408121, vlen=4,
encoding=0x0000000000000000, elen=0) + 2791 at libxo.c:3559
    frame #4: 0x0000000800839d8c
libxo.so.0`xo_format_value(xop=0x000000080062c910, name=0x000000000040811c,
nlen=4, format=0x0000000000408121, flen=4, encoding=0x0000000000000000, elen=0,
flags=4096) + 1468 at libxo.c:3851
    frame #5: 0x000000080083640b libxo.so.0`xo_do_emit(xop=0x000000080062c910,
fmt=0x00000000004080ec) + 1163 at libxo.c:5776
    frame #6: 0x0000000800836dfd libxo.so.0`xo_emit(fmt=0x00000000004080ec) +
365 at libxo.c:5975
    frame #7: 0x00000000004052a7 ls`printlong(dp=0x00007fffffffd788) + 807 at
print.c:197
    frame #8: 0x0000000000404ba1 ls`display(p=0x000000080168a140,
list=0x000000080168a780, options=16) + 4561 at ls.c:896
    frame #9: 0x000000000040381e ls`traverse(argc=1, argv=0x00000000006094b0,
options=16) + 702 at ls.c:577
    frame #10: 0x000000000040352f ls`main(argc=0, argv=0x00007fffffffe3a0) +
3455 at ls.c:498
    frame #11: 0x000000000040208f ls`_start(ap=<unavailable>,
cleanup=<unavailable>) + 383 at crt1.c:78

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-204651-8>