Commit Graph

763 Commits

Author SHA1 Message Date
Sergiu Deitsch
f6e4d960e9
ci: replace lcov by gcovr (#965) 2023-10-07 02:29:58 +02:00
Sergiu Deitsch
1dffb4eb29
fix: enable building without threads (#964) 2023-10-06 22:30:31 +02:00
Sergiu Deitsch
747b8a0774
fix(demangle): limit ParseTemplateArg recursion depth (#963) 2023-10-06 21:32:05 +02:00
Sergiu Deitsch
857df01007
fix(demangle): limit recursion depth (#958) 2023-10-06 02:03:43 +02:00
Sergiu Deitsch
319a0dfba4
fix: stack buffer overflow (#957) 2023-10-06 01:47:56 +02:00
Sergiu Deitsch
e567cfc442
fix: address sanitizer failures (#956) 2023-10-06 00:34:38 +02:00
Sergiu Deitsch
7ba2f7bc02
fix(demangle): prevent signed integer overflow (#955) 2023-10-05 23:33:23 +02:00
Sergiu Deitsch
27bf2b2fd3
ci: update to ndk r26 2023-10-05 21:58:43 +02:00
Sergiu Deitsch
fab3b5eac4
ci: support C++23 2023-10-05 21:41:33 +02:00
Sergiu Deitsch
b90799c277
ci: drop setup-ninja action 2023-10-05 20:27:31 +02:00
Sergiu Deitsch
3411d58669 cmake: eliminate deprecation warning 2023-10-05 00:49:39 +02:00
Philipp Wollermann
64827572c0
SendEmail: Protect users against vulnerable logmailers (#939)
glog is used on a variety of systems, and we must assume that some of
them still use vulnerable mailers that have bugs or "interesting
features" such as https://nvd.nist.gov/vuln/detail/CVE-2004-2771.

Let's protect users against accidental shell injection by validating
the email addresses against a slightly stricter version of the regex
used by HTML5 to validate addresses[1].

This should prevent triggering any unexpected behavior in these tools.

Also add some basic unit tests for the SendEmail method.

[1] https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address
2023-09-07 17:31:25 +02:00
Praveen Ravichandran
6fbc93a7e4
fix(readme): typo in conan install step (#946) 2023-09-06 08:58:09 +02:00
Rodrigo Queiro
3a0d4d22c5
Warn about dragons in the Bazel include path (#927)
https://github.com/google/glog/issues/837 has caused a couple of
disappointments for PR authors, so I'm hoping this comment can save them
some time, or even help them towards finding a complete solution for the
problem.
2023-06-05 11:08:12 +02:00
Eric Kilmer
22491eb123
logging: Prevent LogStream constructor from being discarded (#925)
Fixes linker error reported in #922
2023-05-25 21:26:33 +02:00
Vertexwahn
4945347d07 Fix spelling mistakes 2023-05-25 20:51:51 +02:00
Mai Hussien
888f93947b Move commandlineflags.h to shared_headers 2023-05-15 16:31:45 +02:00
Mai Hussien
4ffdf0dc78 Move shared headers to a private filegroup 2023-05-15 16:31:45 +02:00
Mai Hussien
7a62819e43 Fix targets for layering_check 2023-05-15 16:31:45 +02:00
Brad Smith
aca9a23c83
fixed OpenBSD support (#921)
- Usage of syscall() is not allowed
- Use getthrid() to retreive the thread ID
2023-05-10 13:41:38 +02:00
Sergiu Deitsch
6742834201
move to C++14 (#902) 2023-02-28 12:26:49 +01:00
Peng Xiao
35f4efbb0a bazel: Add HAVE_EXECINFO_H copts to fix empty stack trace 2023-02-28 12:10:03 +01:00
Catena cyber
9c3d6d0e71
ci: include CIFuzz GitHub workflow (#903) 2023-02-27 11:23:27 +01:00
Uilian Ries
a13d03babc
add conan usage to README (#862)
Signed-off-by: Uilian Ries <uilianries@gmail.com>
2023-02-24 22:55:35 +01:00
Catena cyber
846c3fe55b
Add fuzz testing for demangle (#878) 2023-02-24 22:45:32 +01:00
Sergiu Deitsch
1b59cb0905
drop custom prefix option (#898) 2023-02-24 20:40:09 +01:00
Sergiu Deitsch
af8344bbbe
cmake: rename glogbase to glog_internal (#901) 2023-02-24 20:39:46 +01:00
Sergiu Deitsch
88e2cd4eef
avoid anonymous struct typedefs (#900) 2023-02-24 20:15:03 +01:00
Sergiu Deitsch
4ffb2f3c40
drop lgtm badges (#899) 2023-02-24 20:13:38 +01:00
Sergiu Deitsch
4056374800
fixed emscripten detection (#897) 2023-02-24 19:25:26 +01:00
Sergiu Deitsch
f545ff5e7d
ci: update actions (#886) 2023-01-01 18:30:33 +01:00
Sergiu Deitsch
2115d9b590
ci: run linux workflow on ubuntu 22.04 (#885) 2023-01-01 18:08:53 +01:00
James Sharpe
c18db3903b Fix Windows clang CI for CC toolchain resolution
Select the correct toolchain and platform for
building with clang on windows with CC toolchain
resolution active.
2022-11-30 10:37:01 +01:00
Ivo List
05fbc65278 Disable cc toolchain resolution when using Clang on Windows
Different compilers on Window are not yet supported with CC toolchain resolution.
2022-09-21 17:00:02 +02:00
Rodrigo Queiro
9ad08ac6cc Remove symbolize Bazel test
It is broken on Windows CI (#859) in a way that I don't understand.
2022-09-15 16:42:46 +02:00
Sergiu Deitsch
b70ea80433
Revert "simplify DLOG macro definition in NDEBUG mode (#830)" (#855)
This reverts commit 278ed96891.
2022-08-18 16:14:23 +02:00
Marek Cirkos
bfee415a1d
bazel: fix broken stacktrace (#851)
Since #846, `HAVE_UNWIND_H`  is not really in use. Instead we should use `HAVE__UNWIND_BACKTRACE` and `HAVE__UNWIND_GETIP` (added in #846). To prevent that from happening again, also added Bazel tests that confirm stacktrace are still working.
2022-08-16 18:48:59 +02:00
Andrei Polushin
acc60d0c38
logsink: fix multiple issues with LogSink::ToString() (#852)
1. Initializing std::ostringstream with a string makes no sense, as the
   string becomes an initial value of an underlying buffer; seek-to-end
   is not performed, so the initial value gets completely overwritten by
   subsequent writing.

2. Flag `log_year_in_prefix` should be considered, as if formatting a
   regular logging message.

3. Writing a buffer to std::ostream is better expressed with write(s,n).
2022-08-13 12:21:25 +02:00
Andrei Polushin
6d5b384507
SetLogger should delete previously set custom logger. (#853)
As specified in the doc comment for SetLogger, "the logger becomes the
property of the logging module and should not be deleted by the caller".

Not only should the LogDestination delete a custom logger in its
destructor, but it should also delete a previous logger when another
logger is passed to SetLogger().

Co-authored-by: Sergiu Deitsch <sergiud@users.noreply.github.com>
2022-08-13 12:20:33 +02:00
Andrei Polushin
1fb4cc1958
log_file_header: add option to disable log file headers. (#850)
Log lines can be customized for parsing by an external tool.

To simplify such customization and parsing, there should be an option to
customize the file header, or at least to disable adding it.
2022-08-13 11:10:00 +02:00
Andrei Polushin
a1b6164ef1
windows: call to FormatMessage() should _IGNORE_INSERTS (#849)
Calling FormatMessage without a FORMAT_MESSAGE_IGNORE_INSERTS flag could
cause trouble, as explained in an article by Raymond Chen:

* The importance of the FORMAT_MESSAGE_IGNORE_INSERTS flag
  https://devblogs.microsoft.com/oldnewthing/20071128-00/?p=24353
2022-08-12 15:18:55 +02:00
rain
278ed96891
simplify DLOG macro definition in NDEBUG mode (#830)
Co-authored-by: joliph <joliphzjf@gmail.com>
Co-authored-by: Sergiu Deitsch <sergiud@users.noreply.github.com>
2022-08-06 20:33:23 +02:00
Sergiu Deitsch
6ed0c9e58b
added emscripten support (#846) 2022-08-04 22:52:47 +02:00
Sergiu Deitsch
a34226ca94
support ndk r25 (#844) 2022-08-01 10:46:35 +02:00
Joey Parrish
c515e1ae2f
remove unused STDC_HEADERS definition (#835) 2022-07-02 01:03:18 +02:00
Yun Peng
79d692c645 Strip only the first leading @
This change is needed for glog to work with future version of Bazel when
canonical label literals is used in Bzlmod.

Context: https://docs.google.com/document/d/1N81qfCa8oskCk5LqTW-LNthy6EBrDot7bdUsjz6JFC4/edit#heading=h.5mcn15i0e1ch
2022-06-15 18:05:23 +02:00
Xiangquan Xiao
086ce224d2 bazel: Use glog 0.6.0 in README. 2022-06-13 12:53:24 +02:00
Sergiu Deitsch
b33e3bad4c
Merge pull request #812 from google/release-0.6
release 0.6
2022-04-05 00:03:27 +02:00
Sergiu Deitsch
54b8bcbbf1 release 0.6 2022-04-02 20:33:57 +02:00
Sergiu Deitsch
864ef64920
Merge pull request #801 from skeptic-monkey/master
Fix namespace resolution issue in LOG_EVERY_T
2022-03-16 15:51:09 +01:00