* Use CMakeLists.txt to check the availability of std::atomic<>
* Declare the static integer counters as std::atomic<int> instead of int if C++11's atomic is available
* implement fallback mechanism for pre C++11 compilers
* src/glog/logging.h.in: fix wrong atomic increment
* src/glog/logging.h.in: make modulo operations atomic
Currently the user has to rely on the HAVE_SYMBOLIZE detection inside
CMakeLists.txt without having any control over whether it should be used.
Add support for disabling HAVE_SYMBOLIZE at configure time so user can specify
`cmake -DHAVE_SYMBOLIZE=0`.
Signed-off-by: Ed Baunton <ebaunton1@bloomberg.net>
Fallback to using file offsets if no symbol is found, like we do if the
object could not be opened.
This makes backtraces usable even if objects in the trace are stripped,
since the trace can be symbolized by post-processing it with a tool like
asan_symbolize.py.
Note that this is not currently compatible with SymbolizeCallback as
this overwrites the filename in the buffer. The behavior is unchanged
in that case.
Closes: #514
* Added fixed log name support, take 2
See https://code.google.com/p/google-glog/issues/detail?id=209 and former https://github.com/google/glog/pull/19 - this is an updated version of that patch.
It adds a flag that allows to switch behavior from base_filename + filename_extension + time_pid_string to base_filename + filename_extension, while still defaulting to the current behavior to avoid breakage in existing code. This change would allow easier log rotation schemes and better control on what's written on disk.
* Ifdef away fcntl on mingw
* Use the defined HAVE_FCNTL instead
* ifdef away tests as well
add have_sys_wait for wait() on mingw.
* OS_WINDOWS bug in fseeking to the end, only triggered here
When UNWIND_LIBRARY is used directly as a public dependency then
absolute path is stored in cmake config file. This is an issue when
glog is used as part of an SDK, which was built somewhere else. When
SDK is installed on developer's machine, cmake config contains a full
path to non-existent location. The solution is to find libunwind
during configure stage and store target name as a dependency, not a full path.
Cmake module looks for libunwind and libunwind-PLAT, where PLAT is one of
supported platforms.
Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
* Upstream Chromium local changes to symbolize.cc
Chromium has its own fork of symbolize.cc and symbolize.h, and it has
several not-yet-upstreamed changes, that are not specific to Chromium.
This patch upstreams such a changes.
Fixed google::FindSymbol reading past end of a section
3dae0a2d7d
Fix -INT_MIN integer overflow in itoa_r().
ac4d28e9cb
Add print_unsymbolized_stack_traces gn arg.
6a2726776f
Switch to standard integer types in base/.
9b6f42934e
* Add a build option to print unsymbolized traces
This PRINT_UNSYMBOLIZED_STACK_TRACES option to cmake, and
--enable-unsymbolized-traces option to autoconf.
* added dbghelp symbolizer support for mingw and cygwin
* fixed compiler errors in case <stdint.h> is not available
* cmake: check whether SymFromAddr actually works
This allows to avoid conflicts between third party gflags find modules floating
around. If a package provide a local version of gflags find module, clients
which locate glog will incorrectly use it. Another problem is a CMake error message
"cmake_policy PUSH without matching POP" in nested find_package calls. In summary,
we need to ensure to use the original gflags package config.
The gflags project updated their CMake config last year with a
`gflags` ALIAS target. This can be used instead of the legacy
`${gflags_LIBRARIES}` and `${gflags_INCLUDE_DIRS}` variables. It also
looks cleaner.
Fixes#198