[Bug 227552] w, uptime i386 cordeump

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Apr 24 20:46:35 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227552

--- Comment #9 from Oleksandr Tymoshenko <gonzo at FreeBSD.org> ---
xo_default_handle is passed as an argument to xo_init_handle so I added a
breakpoint and checked its content. Since it's static it's supposed to be
zero-initialized but instead there are a lot of garbage values.
xo_default_handle is thread-local variable so it might be a contributing
factor.

root at freebsd:/home/gonzo # /usr/local/bin/gdb w
GNU gdb (GDB) 8.1 [GDB v8.1 for FreeBSD]
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-portbld-freebsd11.1".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from w...Reading symbols from
/usr/lib/debug//usr/bin/w.debug...done.
done.
(gdb) break xo_init_handle
Function "xo_init_handle" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (xo_init_handle) pending.
(gdb) run
Starting program: /usr/bin/w

Breakpoint 1, xo_init_handle (xop=0x2806aff0) at
/usr/src/contrib/libxo/libxo/libxo.c:640
640         xop->xo_opaque = stdout;
(gdb) p *xop
$1 = {xo_flags = 0, xo_iflags = 2883994737386192896, xo_style = 45072,
xo_indent = 10246, xo_indent_by = 41472, xo_write = 0x1,
  xo_close = 0x280601ef <__pthread_cleanup_push_imp_int+31>, xo_flush =
0x2806b020, xo_formatter = 0x2806a400, xo_checkpointer = 0x5d,
  xo_opaque = 0x280601ef <__pthread_cleanup_push_imp_int+31>, xo_data =
{xb_bufp = 0x2806b030 "@\260\006(", xb_curp = 0x2806a600 "z\270P\325\001",
xb_size = 161},
  xo_fmt = {xb_bufp = 0x280601ef <__pthread_cleanup_push_imp_int+31>
"\377\220\344\001", xb_curp = 0x2806b040 "", xb_size = 671524864}, xo_attrs = {
    xb_bufp = 0x147 <error: Cannot access memory at address 0x147>, xb_curp =
0x280601ef <__pthread_cleanup_push_imp_int+31> "\377\220\344\001", xb_size =
0},
  xo_predicate = {xb_bufp = 0x2806aa00 "z\270P\325\001", xb_curp = 0x164
<error: Cannot access memory at address 0x164>, xb_size = 671482351},
  xo_stack = 0x2806c000, xo_depth = 0, xo_stack_size = 671506032, xo_info =
0x280601ef <__pthread_cleanup_push_imp_int+31>, xo_info_count = 671527024,
  xo_vap = 0x2806ac00 "z\270P\325\001", xo_leading_xpath = 0x421 <error: Cannot
access memory at address 0x421>, xo_mbstate = {
    __mbstate8 =
"\357\001\006(\000\000\000\000\000\252\006(-\004\000\000\357\001\006(\000\000\000\000\000\252\006(\377\001\000\000\357\001\006(\240\260\006(\000\250\006(f\t\000\000\357\001\006(\000\000\000\000\000\252\006(s\t\000\000\357\001\006(\000\000\000\000\000\252\006(\030\n\000\000\357\001\006(\000\000\000\000\000\252\006(q\005\000\000\357\001\006(\340\260\006(\000\240\006(\000\000\000\000\357\001\006(\360\260\006(\000\242\006(\000\000\000",
_mbstateL = 671482351},
  xo_anchor_offset = 671482351, xo_anchor_columns = 671527168,
xo_anchor_min_width = 671523840, xo_units_offset = 0, xo_columns = 671482351,
  xo_color_map_fg = "\020\261\006(\000\246\006(", xo_color_map_bg =
"\000\000\000\357\001\006( \261", xo_colors = {xoc_effects = 6 '\006',
xoc_col_fg = 40 '(',
    xoc_col_bg = 0 '\000'}, xo_color_buf = {xb_bufp = 0x0, xb_curp = 0x280601ef
<__pthread_cleanup_push_imp_int+31> "\377\220\344\001", xb_size = 671527216},
  xo_version = 0x2806aa00 "z\270P\325\001", xo_errno = 0, xo_gt_domain =
0x280601ef <__pthread_cleanup_push_imp_int+31> "\377\220\344\001", xo_encoder =
0x0,
  xo_private = 0x2806ac00}
(gdb)

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


More information about the freebsd-bugs mailing list