Commit Graph

587 Commits

Author SHA1 Message Date
Roman Gershman
6adf6d7ae5 fix debug build using gcc -fsanitize=undefined (#374) 2018-12-12 10:16:49 +01:00
Sergiu Deitsch
125d6b3df4
Merge pull request #330 from NeroBurner/ci_travis_appveyor_master
ci: add appveyor and travis config
2018-12-12 09:00:35 +01:00
Ky Waegel
615d0b9712
Use push/pop macro when supressing warning
* Previous implementation did not correctly restore the warning state if initially disabled.
2018-11-27 17:35:07 -08:00
Taiju Tsuiki
781096619d Upstream Chromium local changes to symbolize.cc (#391)
* 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.
2018-11-21 11:14:38 +09:00
Rodrigo Queiro
de82428e52 Use gflags 2.2.2 in Bazel build
The newly-released gflags 2.2.2 includes fixes to the Bazel BUILD files
that weren't in the older 2.2.1 release.
2018-11-19 09:57:51 +01:00
Fumitoshi Ukai
c44e3bbb8f
Merge pull request #388 from tzik/pread
Make symbolize.cc thread safe even on shared fds
2018-11-14 16:03:33 +09:00
tzik
1081df6e5c Make symbolize.cc thread safe even on shared fds
ReadFromOffset in symbolize.cc used to call lseek() + read() to read
data from fd. However, the fd may be reused for multiple symbolize
requests from multiple threads, and causes a race around the fd read
offset.

This updates it to use pread() to resolve the race.
2018-11-13 12:55:09 +09:00
Yun Peng
5c292672df Use Starlark version of http_archive
To fix https://github.com/google/glog/issues/376
2018-11-05 11:50:58 +01:00
Sergiu Deitsch
e364e754a6
Merge pull request #367 from bsilver8192/master
Don't crash on some forms of invalid ELF files
2018-10-23 21:50:06 +02:00
Sergiu Deitsch
c4bada1876
Merge pull request #371 from zaporozhets/fix_mistyping_in_comment
Fix mistype in comment
2018-10-23 21:42:15 +02:00
Taras Zaporozhets
a9393f0909 Fix mistype in comment 2018-10-17 15:54:37 +03:00
NeroBurner
b8221040d2 [skip CI] add badges to README, rename to markdown 2018-10-15 13:34:52 +02:00
NeroBurner
a29380601b set timeout for stacktrace unittest
The stacktrace unittest hangs when compiled with MSVC. The default
timeout is 1500 seconds. Change it to 30 seconds
2018-10-15 13:34:52 +02:00
NeroBurner
0cf2af6e69 ci: add appveyor and travis config
Add toolchain directory with cmake toolchain files used to find
compilers and set C++ versions

The following configurations are build on Windows using appveyor
service:
- enable MSVC 2015 SDK 8.1
- enable MSVC 2015
- enable MSVC 2017
- enable MSVC 2017 c++17
- enable mingw-cxx11
- enable mingw-gnuxx11
- enable mingw-cxx17

The following configurations are build on Linux using travis service:
- enable Ubuntu 14.04 amd64/i386, C++11
- enable Ubuntu 16.04 amd64/i386, C++11
- enable Ubuntu 18.04 amd64 C++98, C++11, GNU++11, C++17
- enable mingw-w64 on Ubuntu 18.04 amd64, C++11, GNU++11, C++17

The tests for cross compiled mingw windows binaries are run using wine64
2018-10-15 13:34:52 +02:00
Hemant
41a6a7880e
Fix warnings
Fixed these warnings:

src/logging_unittest.cc: At global scope:
src/logging_unittest.cc:1081:13: warning: 'void MyCheck(bool, bool)' defined but not used [-Wunused-function]
 static void MyCheck(bool a, bool b) {
             ^~~~~~~
src/logging_unittest.cc:1078:13: warning: 'void MyFatal()' defined but not used [-Wunused-function]
 static void MyFatal() {
             ^~~~~~~
2018-10-12 13:25:19 +01:00
Brian Silverman
91e3fdcefc Don't crash on some forms of invalid ELF files
With a few tweaks, it will fail to look up symbol names in these cases
instead.
2018-09-18 17:08:27 -07:00
Jacob Trimble
a606c3187b Allow getpwuid_r to return missing entry.
If the getpwuid_r method doesn't find an entry with the given ID, it
will still return success (0), but the *result will be set to NULL.
This checks the |result| value so it won't crash if it doesn't find
the entry.

This normally shouldn't ever happen, but it can somehow happen on
iOS simulators.
2018-07-27 10:58:18 -07:00
Sergiu Deitsch
8d7a107d68
Merge pull request #344 from dzung-hoang/master
Fix errors with BUILD_SHARED_LIBS=ON for Visual Studio 2017 (fixes #343)
2018-07-16 09:18:06 +02:00
Dzung Hoang
87b82b2362 fix errors with BUILD_SHARED_LIBS=ON for Visual Studio 2017 2018-07-16 02:10:05 -05:00
levosos
367518f650 copts are passed correctly when building w/o gflags
resolves #338
2018-07-09 11:14:33 +02:00
Sergiu Deitsch
046f441a39
generate an empty NEWS file (fixes #340) 2018-07-06 12:41:50 +02:00
Sergiu Deitsch
039608d46a
Merge pull request #336 from NeroBurner/patch-1
fix glog.html link to gflags repository
2018-07-03 20:11:28 +02:00
Sergiu Deitsch
5514af001e
Merge pull request #337 from NeroBurner/remove_NEWS
Delete NEWS
2018-07-03 20:10:50 +02:00
NeroBurner
520186c233 Delete NEWS
remove unused 10 year old empty file
2018-07-02 14:21:54 +02:00
NeroBurner
aa9aaac09f
fix glog.html link to gflags repository
Fixes Issue https://github.com/google/glog/issues/325
2018-07-02 11:54:44 +02:00
Sergiu Deitsch
3267f3e1a8
Merge pull request #331 from NeroBurner/fix_windows_logging_ut
Fix windows logging ut
2018-06-29 12:31:45 +02:00
Sergiu Deitsch
c72907c4a8
Merge pull request #332 from NeroBurner/fix_cxx17_throws
tests: fix compilation with C++17
2018-06-21 15:20:24 +02:00
NeroBurner
5fa1d59065 tests: fix compilation with C++17
Remove throw() commands as they were deprecated with C++11 and are
removed with C++17
2018-06-21 14:05:09 +02:00
Artem Dinaburg
f39f78c7cc Define constants for _open and silence some warnings 2018-06-20 12:50:50 +02:00
Artem Dinaburg
b54793d232 Windows has the fc utility to compare files instead of diff 2018-06-20 12:50:50 +02:00
Artem Dinaburg
62c3e3cd56 The %p format is implementation defined. Compare it via a special token,
just like the null pointer test.
2018-06-20 12:50:50 +02:00
Sergiu Deitsch
0301bfdd39
Merge pull request #324 from NeroBurner/fix_mingw_cross_compile
Fix mingw cross compile
2018-06-19 14:36:39 +02:00
loop0day
abce78806c cmake: renamed GFLAGS_NAMESPACE to GLOG_GFLAGS_NAMESPACE (#318)
This eliminates a conflict between glog and gflags preprocessor definition of GFLAGS_NAMESPACE that can cause the gflags namespace detection to fail (fixes #317).
2018-06-01 15:00:59 +02:00
NeroBurner
364fad5649 port: remove unused includes 2018-06-01 14:50:12 +02:00
NeroBurner
800bd423e4 port: split localtime_r definition and impl 2018-06-01 14:50:12 +02:00
NeroBurner
7450a8b345 mingw-w64: check if localtime_r exists
- check in cmake if localtime_r exists
- if localtime_r is missing (MSVC, mingw-w64 on linux) redefine it using
  localtime_s
2018-06-01 14:50:11 +02:00
NeroBurner
0797f7382b mingw-w64: fix port.h pthread recreation 2018-06-01 14:50:10 +02:00
NeroBurner
d354e2e8f9 mingw-w64: fix dbghelp on case sensitive systems
- fix dbhelp.h include
- fix dbghelp check and link
2018-06-01 14:50:07 +02:00
NeroBurner
06a8ee0976 logging: fix basetsd on case sensitive sytems 2018-06-01 14:50:06 +02:00
Daiki Maekawa
2faa186e62 cmake: added BUILD_SHARED_LIBS option (#313) 2018-04-26 08:46:24 +02:00
Ruslan Baratov
d064ab8d0a Fix build for Android API < 21 2018-04-22 23:54:24 +03:00
Rodrigo Queiro
e0341da07b Add Bazel CI configuration
This was previously present in
https://github.com/bazelbuild/continuous-integration, but the Bazel team
asked us to move it to our repo. It will be helpful if we need to change
the build configuration, eg to add new platforms.
2018-04-18 11:54:56 +02:00
Akiyoshi Ochiai
dd2b93d761 Fix __attribute__((noreturn)) mismatch warning in Bazel build 2018-04-18 10:15:54 +02:00
Sergiu Deitsch
2f493d292c
Merge pull request #302 from Nazg-Gul/missing-prototype
Resolve missing prototype warning
2018-03-21 13:45:06 +01:00
Sergiu Deitsch
11afec2795
Merge pull request #303 from Nazg-Gul/reincluded-config
Fix redefined warnings from config.h
2018-03-21 13:44:44 +01:00
Shinichiro Hamaji
643f6d4678
Merge pull request #305 from samuela/patch-1
Make int conversion explicit and fix clang warning
2018-03-21 21:43:40 +09:00
samuela
838753987f
Make int conversion explicit and fix clang warning 2018-03-20 18:03:46 -07:00
Sergey Sharybin
418f9020e3 Fix redefined warnings from config.h
The issue was caused by config.h header being included from both
header files and implementation files.

Proposed solution is to have regular header guard in the generated
config.h. Benefit of this solution is that it's least intrusive.
Downside is that it only solves issue for CMake build system, and
autoconf one is not fixed since header template is automatically
generated by autoheader who does not add header guard.
2018-03-20 11:14:06 +01:00
Shinichiro Hamaji
1fe7e94ac6
Merge pull request #304 from Nazg-Gul/terminfo-konsole
konsole family of terminfo supports colored output
2018-03-20 18:14:33 +09:00
Sergey Sharybin
e35bb111c3 konsole family of terminfo supports colored output
Glog was missing colored output when running in terminal
who is set to konsole* TERM, even though the terminal
itself supports colored output.

Add extra terminfo to the check function, so now output
from Glog is properly colored.
2018-03-20 09:49:07 +01:00