It looks like commit 3c49b93 modified the auto-generated file src/config.h.in
to add a definition of macro GOOGLE_GLOG_DLL_DECL. One of the autotools
reverts this change upon running "make", causing the build to fail when a
source file includes demangle.h.
To fix the problem, revert the change to src/config.h.in and include
glog/logging.h from demangle.h which provides a definition of that macro.
Previously we were using a module's "start address", i.e. the
address at which the module's executable region was mapped, as the
zero virtual address, i.e. the address from which the DSO's virtual
addresses are calculated. This works fine for DSOs created by the
bfd and gold linkers, which will emit a PT_LOAD directive into the
program header which loads the executable region at virtual address
(p_vaddr) and file offset (p_offset) 0.
However, the lld linker may place a read-only region before the
executable region, meaning that both p_vaddr and p_offset for the
executable region are non-zero. This means that any symbols resolved
by the symbolizer are resolved to an incorrect virtual address. To
correctly calculate the address corresponding to virtual address zero,
we need to take into account p_vaddr and p_offset.
Specifically, the calculation starts with the "base address", i.e. the
start address minus the file offset. To get from the base address to
virtual address zero, we first add p_offset. This gives us the mapped
address of the start of the segment, or in other words the mapped
address corresponding to the virtual address of the segment. (Note
that this is distinct from the start address, as p_offset is not
guaranteed to be page aligned.) We then subtract p_vaddr, which takes
us to virtual address zero.
only signalhandler_unittest.cc uses "using namespace gflags".
others use "using namespace GFLAGS_NAMESPACE", so
signalhandler_unittest.cc does the same way.
fixes#62
When I set my own signal handler to SIGABRT, it did not executed
with CHECK. That is because SIGABRT handler is reset to default
just before glog calls abort.
Let me make it reset only if the handler is what glog installed
i.e. FailureSignalHandler.
Path "<prefix>/include" will not be added to the headers search of dependent
targets without specifying INSTALL_INTERFACE, i.e. compilation
will fail with error:
"fatal error: 'glog/logging.h' file not found".
Don't call RAW_VLOG with locking vmodule_lock
SetVLOGLevel locks vmodule_lock however RAW_VLOG at the end also implicitly locks it via InitVLOG3__.
This causes deadlock/segfault.
fixes#29