[Bug 227552] w, uptime i386 cordeump
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Apr 26 16:39:55 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227552
Dimitry Andric <dim at FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dim at FreeBSD.org,
| |emaste at freebsd.org
--- Comment #10 from Dimitry Andric <dim at FreeBSD.org> ---
(In reply to Oleksandr Tymoshenko from comment #9)
> 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.
...
> (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 =
It definitely seems to have something to do with TLS. The libxo.so.0 file
shipped in the FreeBSD-11.2-PRERELEASE-i386-20180420-r332802 snapshot has:
Program Header:
LOAD off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**12
filesz 0x00017160 memsz 0x00017160 flags r-x
LOAD off 0x00017160 vaddr 0x00018160 paddr 0x00018160 align 2**12
filesz 0x00000604 memsz 0x00000654 flags rw-
DYNAMIC off 0x00017264 vaddr 0x00018264 paddr 0x00018264 align 2**2
filesz 0x000000d8 memsz 0x000000d8 flags rw-
TLS off 0x00017160 vaddr 0x00018764 paddr 0x00018764 align 2**3
filesz 0x00000000 memsz 0x00000050 flags r--
STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**2
filesz 0x00000000 memsz 0x00000000 flags rw-
but if I install this snapshot onto a machine, check out stable/11 r332802 and
rebuild lib/libxo, the resulting libxo.so.0 has:
Program Header:
LOAD off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**12
filesz 0x00017160 memsz 0x00017160 flags r-x
LOAD off 0x00017160 vaddr 0x00018160 paddr 0x00018160 align 2**12
filesz 0x00000604 memsz 0x00000654 flags rw-
DYNAMIC off 0x00017264 vaddr 0x00018264 paddr 0x00018264 align 2**2
filesz 0x000000d8 memsz 0x000000d8 flags rw-
TLS off 0x00017160 vaddr 0x00018160 paddr 0x00018160 align 2**3
filesz 0x00000000 memsz 0x00000658 flags r--
STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**2
filesz 0x00000000 memsz 0x00000000 flags rw-
E.g. the shipped version has a TLS section of just 0x50 bytes, while the
recompiled version has 0x658 bytes. The recompiled version also works just
fine, with every test I throw at it.
I don't know how the shipped versions are built, but I suspect there is
something off there.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list