Commit Graph

325 Commits

Author SHA1 Message Date
Fumitoshi Ukai
ff5fa62a5f Add Andy Ying to AUTHORS/CONTRIBUTORS 2016-10-19 16:09:41 +09:00
Fumitoshi Ukai
7cff62028c Merge pull request #116 from pcc/fix2
Fix autotools build.
2016-10-19 16:06:38 +09:00
Fumitoshi Ukai
f5cc8631a4 Merge pull request #98 from willyd/relocatable
Added $<BUILD_INTERFACE> to gflags include directory
2016-10-19 16:02:49 +09:00
Fumitoshi Ukai
b3a1dc359d Add Guillaume Dumont to AUTHORS/CONTRIBUTORS 2016-10-19 15:59:24 +09:00
Fumitoshi Ukai
dee7c8c36e Merge pull request #129 from sergiud/cmake-PIC
cmake: enable position independent code (PIC)
2016-10-19 15:52:32 +09:00
Fumitoshi Ukai
fc61880361 Merge pull request #130 from sergiud/cmake-warning-fix
cmake: fixed clang warning propagation to gcc
2016-10-19 15:51:45 +09:00
Sergiu Deitsch
e6c26b2b94 cmake: fixed clang warning propagation to gcc 2016-10-07 11:03:19 +02:00
Sergiu Deitsch
e05f325668 cmake: enable position independent code (PIC) 2016-10-07 10:54:14 +02:00
MiniLight
9c584dd2ed try to avoid the error "conflicting declaration 'typedef DWORD
pthread_t'" etc.
2016-10-03 08:00:09 +08:00
Andy Ying
a00dfdfc53 NULL sinks_ after deletion to prevent dangling pointer 2016-09-11 01:16:32 -04:00
Fumitoshi Ukai
0472b91c5d Add Peter Collingbourne <pcc@google.com> to CONTRIBUTORS 2016-07-14 10:47:13 +09:00
Fumitoshi Ukai
f174cba02c Merge pull request #115 from pcc/fix1
symbolize: Calculate a module's zero VA using program headers.
2016-07-14 10:44:18 +09:00
Peter Collingbourne
8e98eb2a5a Fix autotools build.
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.
2016-06-22 18:48:32 -07:00
Peter Collingbourne
a93a4511ec symbolize: Calculate a module's zero VA using program headers.
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.
2016-06-22 18:41:43 -07:00
dimhotepus
4544e968ab Cache strlen outside of cycles (PVS-Studio) 2016-04-30 14:24:12 +03:00
Fumitoshi Ukai
de6149ef8e Merge pull request #101 from yasushi-saito/master
Allow permission line in /proc/self/map to be "rwx", not just "r-x".
2016-04-15 17:05:30 +09:00
Fumitoshi Ukai
202b395c04 Merge pull request #91 from abdasgupta/master
Added support for PowerPC.
2016-04-13 14:00:49 +09:00
Fumitoshi Ukai
2a7423b346 Merge pull request #82 from sergiud/cmake-imported-target
Better support and documentation for CMake projects that consume glog
2016-04-13 13:59:08 +09:00
Yaz Saito on W541
d630221933 Allow permission line in /proc/self/map to be "rwx", not just "r-x". At
least in Ubuntu14, a binary file that's writable by the process owner
has permission "rwx", not "r-x".
2016-04-11 14:35:42 -07:00
Guillaume Dumont
45901a359f Added $<BUILD_INTERFACE> to gflags include to avoid including the gflags include dir in the glog-targets.cmake 2016-04-05 14:02:42 -04:00
Fumitoshi Ukai
f176cc8454 Merge pull request #96 from mayah/update-windows
Update src/windows/glog/logging.h to ToT
2016-03-31 17:50:09 +09:00
mayah
821d3e806e Run src/windows/preprocess.sh
src/windows/glog/logging.h is not generated by the current source.
Let me run src/windows/preprocess.sh and update the source.
2016-03-31 17:29:36 +09:00
Abhishek Dasgupta
b27d0420fb Added support for PowerPC. 2016-03-21 11:28:53 +00:00
Sergiu Dotenco
c7e35f834c added CMake usage instructions 2016-01-08 15:31:10 +01:00
Sergiu Dotenco
780efcc857 cmake: allow to refer to imported glog target as glog::glog 2016-01-08 14:55:58 +01:00
Fumitoshi Ukai
4d391fe692 use namespace GFLAGS_NAMESPACE instead namespace gflags
only signalhandler_unittest.cc uses "using namespace gflags".
others use "using namespace GFLAGS_NAMESPACE", so
signalhandler_unittest.cc does the same way.

fixes #62
2015-12-17 16:31:55 +09:00
Fumitoshi Ukai
a63f466c48 win: use _fdopen instead of fdopen
The POSIX function fdopen is deprecated.
Use the ISO C++ conformant _fdopen instead.
https://msdn.microsoft.com/library/ms235351.aspx

fixes #73
2015-12-17 15:40:25 +09:00
Fumitoshi Ukai
1256d28554 win: FAILED macro can't be used with HANDLE.
FAILED macro is for HRESULT, not for HANDLE.
FindFirstFile returns INVALID_HANDLE_VALUE when error or not found.
https://msdn.microsoft.com/library/windows/desktop/aa364418(v=vs.85).aspx

fixes #79
2015-12-17 15:36:40 +09:00
Fumitoshi Ukai
0312301143 avoid calling new/malloc in signalhandler.
FlushLogFilesUnsafe would be called in FailureSignalHandler,
so should avoid calling new/malloc, which are not signal safe.

fixes #78
2015-12-17 15:26:15 +09:00
Fumitoshi Ukai
de75983a81 Merge pull request #74 from yoshisatoyanagisawa/fix_sigabrt_action
Reset SIGABRT action only if FailureSignalHandler is installed.
2015-11-27 13:18:55 +09:00
Yoshisato Yanagisawa
cda16b3443 Reset SIGABRT action only if FailureSignalHandler is installed.
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.
2015-11-26 16:19:22 +09:00
Fumitoshi Ukai
f46e0745a8 Merge pull request #58 from ruslo/fix.include
Fix missing public include directory
2015-11-10 17:11:29 +09:00
Fumitoshi Ukai
0ae958f933 Merge pull request #56 from rhencke/fix-test
Fix double-free in unit test on Windows.
2015-11-10 17:10:29 +09:00
Fumitoshi Ukai
013a36bddf Merge pull request #51 from flandr/pthread-cmake-build
Link libpthread when necessary in CMake builds
2015-11-10 17:05:10 +09:00
Ruslan Baratov
ccacef4362 Fix missing public include directory
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".
2015-09-09 00:33:31 +03:00
Nate Rosenblum
bdb6c3219a Add pthread library to linker list when needed 2015-09-06 08:09:36 -07:00
Robert Hencke
c10e6ec19c Fix double-free in unit test on Windows.
The LOG_SYSRESULT refers to result twice.  Since, in this test,
result expands to FindClose(handle), the handle was being freed twice.
2015-09-06 09:53:22 -04:00
Fumitoshi Ukai
a66751870f Merge pull request #49 from sergiud/cmake-visibility
Fixed warning caused by policy CMP0063 introduced in CMake 3.3
2015-08-12 16:10:40 +09:00
Fumitoshi Ukai
85e5c6edad Merge pull request #47 from sergiud/master
Allow to disable multithreading support using CMake
2015-08-12 16:09:02 +09:00
Fumitoshi Ukai
4dd62b0547 Add Teddy Reed to AUTHORS/CONTRIBUTORS 2015-08-12 16:06:34 +09:00
Fumitoshi Ukai
a94afc6807 Merge pull request #26 from theopolis/feature-mode-flag
[#23] Add logfile_mode to control logfile permissions
2015-08-12 16:05:28 +09:00
Sergiu Dotenco
ed6dba0bd8 cmake: fixed warning caused by policy CMP0063 2015-08-11 19:00:14 +02:00
Teddy Reed
58438d398f [#23] Add logfile_mode to control logfile permissions 2015-08-10 16:49:33 -07:00
Sergiu Dotenco
cb5487d901 cmake: allow to disable multithreading support
This commit additionally enables threading for win32 by default.
2015-08-08 21:26:17 +02:00
Fumitoshi Ukai
f7691955e8 Merge pull request #35 from bsilver8192/fix-mocklog-unused-arguments
Fix mocklog unused arguments
2015-08-06 17:17:55 +09:00
Fumitoshi Ukai
254db0ae1b Merge pull request #34 from bsilver8192/fix-macro-redefinition
Fix redefinition of _XOPEN_SOURCE.
2015-08-06 17:15:44 +09:00
Fumitoshi Ukai
4a1e5ef60c Add tomange to AUTHORS/CONTRIBUTORS 2015-08-06 17:10:21 +09:00
Fumitoshi Ukai
cd37eec302 Merge pull request #20 from UbimoLTD/patch-1
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
2015-08-06 17:09:02 +09:00
Fumitoshi Ukai
8db3ff0b75 Merge pull request #12 from ukai/fix_leak
delete LogDestination::sinks_ at DeleteLogDestinations(). 

fixes #8
2015-08-06 16:57:51 +09:00
Fumitoshi Ukai
e91d5c4d02 Add Sergiu Dotenco to AUTHORS/CONTRIBUTORS 2015-08-06 16:55:37 +09:00