Commit Graph

238 Commits

Author SHA1 Message Date
Shinichiro Hamaji
f012836db1 Run src/windows/preprocess.sh 2017-05-09 16:41:58 +09:00
Shinichiro Hamaji
ce4fab2960 glog: release 0.3.5 2017-05-09 16:27:57 +09:00
Fumitoshi Ukai
e56ed55208 Merge pull request #179 from renning22/master
CHECK_NOTNULL works with smart pointers when compiled in C++11.
2017-04-21 09:54:53 +09:00
Ning Ren
0d8c6340f8 CHECK_NOTNULL works with smart pointers when compiled in C++11. 2017-04-20 15:32:24 -07:00
Fumitoshi Ukai
da816ea706 Merge pull request #169 from mayah/windows-no-return
Add __declspec(noreturn) on Win
2017-03-07 12:44:37 +09:00
mayah
8fa778aa12 Add __declspec(noreturn) on Win
Currently cl.exe doesn't know LOG(FATAL) exits the program. Set
__declspec(noreturn).
2017-03-07 11:22:24 +09:00
Fumitoshi Ukai
ab6545470b Merge pull request #164 from yoshisatoyanagisawa/dcheck_always_on
DCHECK_ALWAYS_ON to make D* enabled under NDEBUG
2017-02-09 11:04:00 +09:00
Yoshisato Yanagisawa
027332ffac DCHECK_ALWAYS_ON to make D* enabled under NDEBUG
The macro NDEBUG could be automatically defined for release build on
some build environments (e.g. MSVC).  If we use NDEBUG as a key to
distinguish using DCHECK as CHECK (I call this DCHECK is enabled) or
not, we cannot make DCHECK enabled for release build on such
environments.

Considering people use a program with glog for presubmit testing or
dogfooding, they should need to do release build with DCHECK enabled.
2017-02-08 17:23:37 +09:00
Fumitoshi Ukai
b6a5e0524c Update github.com/sergiud in AUTHORS/CONTRIBUTORS 2016-10-20 15:53:26 +09:00
Fumitoshi Ukai
9581b3fb9b Merge pull request #132 from sergiud/cmake-disable-unittests
cmake: allow to disable building unit tests
2016-10-19 16:40:55 +09:00
Sergiu Deitsch
60375e0bd4 cmake: allow to disable building unit tests
This commit introduces a CMake `BUILD_TESTING` boolean option that
allows to disable unit tests. This is especially useful in superbuilds
where typically only the main library is built. By default, this option
is enabled.
2016-10-19 09:32:21 +02:00
Fumitoshi Ukai
cf36dabd8e Merge pull request #127 from MinGW-caffe/master
try to avoid the error "conflicting declaration 'typedef DWORD pthread_t'" etc. in MinGW
2016-10-19 16:29:34 +09:00
Fumitoshi Ukai
5080258031 Add MiniLight to AUTHORS/CONTRIBUTORS 2016-10-19 16:28:53 +09:00
Fumitoshi Ukai
bf766fac4f Merge pull request #123 from yying/master
Set sinks_ to NULL after deletion in LogDestination::DeleteLogDestinations
2016-10-19 16:10:39 +09:00
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
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